Comments (5)
In order to accomplish this, a new command should be registered.
See how entry points are being handled in the Cliquet project.
You should be able to do this by registering an entry point for the name "kinto". Then, you should use argparse with subparsers in order to handle the different commands.
from kinto.
I came across a library click (http://click.pocoo.org/5/) I guess it would be helpful for other commands also.
from kinto.
Good idea @oak11!
I think we have to distinguish the kinto init
from the two others. Indeed, for init
the user will be prompted for values and options. Whereas for migrate
(and serve
), it will only consist in cabling the existing pserve
and cliquet migrate
existing commands.
The hardest part of the init
command is to implement the prompts with a nice presentation. That's why we can try to find some existing tools that could simplify the task. pcreate
and cookiecutter
could be some good candidates :)
From what I read, click
is a helper to implement a command with options like --count=5
. There are many tools that provide this functionnality (see below), including some from the standard python library. As a rule of thumb, when this happens, we shall never choose without list our needs. And so far, in terms of command-line options, I haven't thought of anything special!
Tools for CLI parsing:
Toolkits:
- http://pypi.python.org/pypi/prompt_toolkit
- http://builtoncement.com
- https://plumbum.readthedocs.org/en/latest/
from kinto.
Thats true, For now, I'll continue working on the init command. Thanks for the tools and toolkits listed above, they seem interesting to use. I'll try working with them once the init command is done.
from kinto.
Done in 1.9.0
from kinto.
Related Issues (20)
- Responsible disclosure policy HOT 1
- Replace current Kinto Admin setup with `kinto-admin` git submodule HOT 1
- Replace `psycopg2` with `psycopg2-binary`?
- id missing in the payload for the endpoint POST /accounts HOT 7
- Last modified field in collection is incorrect HOT 7
- Either don't send email notification or only selectively notify about changes to nimbus-desktop-experiments
- Wait until database starts before starting Kinto in Docker Compose HOT 2
- Replace `raven` by `sentry-python`
- Custom Certificate for OpenId / urllib3? HOT 1
- Add support for SQLAlchemy >=2.0
- Drop support for Python 3.7? HOT 1
- HTTP 500 on create bucket error":"Internal Server Error" HOT 2
- Performance for plural endpoints is suboptimal
- Kinto does now show permissions if you have `write` access on the parent object HOT 1
- Allow for an opt-in feature to show resource owners
- Demo does not work
- Investigate selenium test errors HOT 1
- Duplicated lists of dependencies HOT 2
- Building and running docker locally causes the UI to not load
- Preview thumbnail of attached image file is not shown in UI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kinto.