Git Product home page Git Product logo

Comments (5)

almet avatar almet commented on May 21, 2024

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.

oak11 avatar oak11 commented on May 21, 2024

I came across a library click (http://click.pocoo.org/5/) I guess it would be helpful for other commands also.

from kinto.

leplatrem avatar leplatrem commented on May 21, 2024

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:

from kinto.

oak11 avatar oak11 commented on May 21, 2024

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.

leplatrem avatar leplatrem commented on May 21, 2024

Done in 1.9.0

from kinto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.