Command line application micro-framework.
Project description
Glint is a micro framework for command line applications, it creates the needed parameters that should be passed to the application based on the function signatures that it is supplied.
Inspiration
The inspiration for Glint came from wanting to have a command driven cli app similar to how git works which I was unable to replicate with argparse.
Requirements
Glint requires Python 3.3 or higher to run, it has no other dependencies outside of the python core library.
Installation
The easiest way to install Glint is to use pip and run:
pip install glint
Otherwise download the Glint source code extract it and from the root directory run:
python ./setup.py install
Usage
All usage documentation for Glint can be found over at read the docs.
Future Plans
If you want to see what’s coming up in the near future for Glint go visit the huboard for the project.
Contributing
The source for Glint can be found over at Github, if you want to contribute that would be a good place to start. If you are wanting to report a bug all of that is kept at github as well in the issue tracker, the issues are also used to track upcoming work on Glint though features/issues that will be worked on before the next release can be more easily visualised over at huboard. If you want to keep a track of the status of the bleeding edge then you’ll able to see the current state at Travis.
Submitting changes
You’ve downloaded/cloned Glint and made some changes you’d like to have merged in, firstly awesome thanks hugely! There are a couple of guidelines around submitting changes:
Changes will only be accepted via pull requests on github.
Any code changes should have some unit tests, if it’s a fix for a bug it won’t be accepted unless it has tests.
Again with any code changes if your pull request breaks the build it won’t be accepted.
Running the tests
While Glint doesn’t have any dependencies outside of the python core library you will need to install nose to run the tests. Once that is installed you have two options for running the test you can run either:
nostests
or
python ./setup.py test
Change Log
v0.2.0
Updated the argument parsing to allow optional arguments in the format of <prefix><name>=<value>
Updated the argument parsing to replace - characters with _ when parsing positional arguments and flags.
v0.1.0
Running a method based on the first argument supplied.
Running a ‘default’ method when no arguments are supplied.
Parsing of positional arguments based on method signature.
Parsing of optional arguments based on method signature.
Parsing of flags based on method signature.
Printing of dynamically generated help screen based on the commands that had been set up.
Printing of dynamically generated help screen for a particular command based on the method signature supplied to that command.
License
Glint is available under the MIT license which is as follows:
Copyright © 2013 Michael Lowen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file Glint-0.2.0.zip
.
File metadata
- Download URL: Glint-0.2.0.zip
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d249e5606231af9612c71158ae8e3a7ca0933d3a6cb597096d61338f1aa3a0a2 |
|
MD5 | 5166482e078a344fe7d43adc4e9d4b36 |
|
BLAKE2b-256 | 1e58286b5ce2a301d654f07a475d86e85ea1897df3c0347637038de52e31027b |