Closed harshkhandeparkar closed 1 year ago
Testing toh badmein karenge but before that do the following things:
* [ ] Must have a `login()` function which calls all of those modular function which you broke with same arguments as before so that the new version is backwards compatible - there's not breaking change * [ ] Please make sure there's no breaking changes and this should support CLI and WebApp at the same time!
The erp.py
is untouchef and has the login
function. There are no breaking changes.
Testing toh badmein karenge but before that do the following things:
* [ ] Must have a `login()` function which calls all of those modular function which you broke with same arguments as before so that the new version is backwards compatible - there's not breaking change * [ ] Please make sure there's no breaking changes and this should support CLI and WebApp at the same time!
The
erp.py
is untouchef and has thelogin
function. There are no breaking changes.
No, alag alag files mein nahi banana wahi toh kehra.. ek hi file se.. I want something like an argument webapp=True
and then it does the webapp magic.. is it possible to use it with single line for webapps?
Testing toh badmein karenge but before that do the following things:
* [ ] Must have a `login()` function which calls all of those modular function which you broke with same arguments as before so that the new version is backwards compatible - there's not breaking change * [ ] Please make sure there's no breaking changes and this should support CLI and WebApp at the same time!
The
erp.py
is untouchef and has thelogin
function. There are no breaking changes.No, alag alag files mein nahi banana wahi toh kehra.. ek hi file se.. I want something like an argument
webapp=True
and then it does the webapp magic.. is it possible to use it with single line for webapps?
No it's probably not possible (depends on the framework) and also better not to. This gives more flexibility.
This gives more flexibility.
No, lemme try to elaborate to you the vision of this module.
The login process for CLI of any app is same but there can be cases which the devs want - what you call flexibility here - is what we provide but in more easy manner
All of this with just a single line and when used in various combinations.. they cover all of the cases.
Similarly should be for webapp, One should require only to change one line (the arguments) and they will be able to get the required flexibility. But this time it's more easy!
Basically the vision is to provide flexibility with a single line itself, we do the hard work of providing flexibility.
I would recommend you to go through the documentation once again and see how the workflow goes.
What we can do is, for now let there be a separate file for webapp for the time being. But the usage should be a one liner. And for that your compartmentalisation / modularisation of the code is still important and is not wasted.. we need to implement a login function which will take the arguments to provide flexibility (what all flexibility - we can discuss about that). But I don't want users to write more than one line to implement the login functionality.
What we can do is, for now let there be a separate file for webapp for the time being. But the usage should be a one liner. And for that your compartmentalisation / modularisation of the code is still important and is not wasted.. we need to implement a login function which will take the arguments to provide flexibility (what all flexibility - we can discuss about that). But I don't want users to write more than one line to implement the login functionality.
A webapp can't be implemented in a one liner function. A webapp will have to do many back and forths to complete the login process and will require multiple functions. Even if it could be done using classes or one liners or something, it's the backend's responsibility and not the login library. It won't even be convenient for the backend with a one liner.
A one liner is great and the best way in CLI environments.
This gives more flexibility.
No, lemme try to elaborate to you the vision of this module.
The login process for CLI of any app is same but there can be cases which the devs want - what you call flexibility here - is what we provide but in more easy manner
* The user has flexibility to turn on/off manual/automatic credentials * Same with OTP * Same with Logging * Same with SSOToken
All of this with just a single line and when used in various combinations.. they cover all of the cases.
This is great, but again only for CLI apps. Doing this in a webapp is the webapp's responsibility not the package. The package just has to provide a simple way to be able to do it. Each webapp is different and will handle things differently, having separate functions is the best way.
Similarly should be for webapp, One should require only to change one line (the arguments) and they will be able to get the required flexibility. But this time it's more easy!
* Credentials are manual -> store them in local storage or whatever. * OTP stays manual. * Logging for debugging purposes * SSOToken will be stored in local storage by default.
Basically the vision is to provide flexibility with a single line itself, we do the hard work of providing flexibility.
The same flexibility will be available even with separate functions and the webapp will require separate functions since each back and forth of information will be handled separately.
I would recommend you to go through the documentation once again and see how the workflow goes.
I have read the documentation and I understand the workflow. That workflow is perfect and works well in a CLI app because the user input and the backend run in the same environment and the user input is handled by the package itself. Not the case for web apps.
Continuing the discussion on slack.
Hum kaam kar rahe ab isspar 😇
waah bhai
Changes
erp.py
untouched).erp.py
untouched)erp.py
was also next-genized but reverted it becauseerp.py
ain't broke.closes #12 Go make webapps.
To be done