A Python CLI
Project description
pythoncli
A Python Command Line Interface (CLI) that performs Digital Audio Workstations (DAW) actions using Digital Signal Processing (DSP) Techinques and algorithms . The template used for creating this Readme file is stated below.
shablona
Shablona is a template project for small scientific python projects. The recommendations we make here follow the standards and conventions of much of the scientific Python eco-system. Following these standards and recommendations will make it easier for others to use your code, and can make it easier for you to port your code into other projects and collaborate with other users of this eco-system.
Organization of the project
The project has the following structure:
pythoncli/
|- README.md
|- pythoncli/
|- __init__.py
|- __main__.py
|- classmodule.py
|- effectsmodule.py
|- funcmodule.py
|- loadingmodule.py
|- resamplemodule.py
|- supereffectmodule.py
|- pythoncli.egg-info/
|- dependency_links.txt
|- entry_points.txt
|- PKG-INFO
|- SOURCES.txt
|- top_level.txt
|- setup.py
|- install.sh
|- LICENSE
|- .gitignore
In the following sections we will examine these elements one by one. First,
let's consider the core of the project. This is the code inside of
pythoncli/__main__.py
. The code provided in this file is intentionally rather
simple. It implements some simple command routing each to its specific file from the input string taken thought the terminal.
Module code
We place the module code in a file called __main__.py
in directory called
pythoncli
. This structure is a simple way to create a structure for the project ,
we also need to also create a file in __init__.py
which contains code that imports
everything in that file into the namespace of the project:
from .effectsmodule import *
In the module code, we follow the convention that all functions are either imported from other places, or are defined in lines that precede the lines that use that function. This helps readability of the code, because you know that if you see some name, the definition of that name will appear earlier in the file, either as a function/variable definition, or as an import from some other module or package.
Installation
For installation and distribution we will use the python standard
library distutils
module. This module uses a setup.py
file to
figure out how to install your software on a particular system. For a
small project such as this one, managing installation of the software
modules and the data is rather simple.
This also makes it possible to install your software with using pip
and
easy_install
, which are package managers for Python software. The
setup.py
file reads this information from there and passes it to the
setup
function which takes care of the rest.
Continuous integration
Still have not chosen a Continous Intregration / Deployment methods.
Distribution
The main venue for distribution of Python software is the Python Package Index, or PyPI, also lovingly known as "the cheese-shop".
To distribute your software on PyPI, you will need to create a user account on PyPI. It is recommended that you upload your software using twine.
Using Travis, you can automatically upload your software to PyPI, every time you push a tag of your software to github. The instructions on setting this up can be found here. You will need to install the travis command-line interface
Licensing
MIT License . Copyright © 2019 Peter Hassaballah 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.
Scripts
A scripts directory can be used as a place to experiment with your module code, and as a place to produce scripts that contain a narrative structure, demonstrating the use of the code, or producing scientific results from your code and your data and telling a story with these elements.
For example, this repository contains an [IPython notebook] that reads in some data, and creates a figure. Maybe this is Figure 1 from some future article? You can see this notebook fully rendered here.
Example of a sript :
pip install -e .
Which allows the project to be updated inside the pip directory as it is registered as under development or development mode .
Git Configuration
Currently there is 1 file in the repository which help working with this repository, and which you could extend further:
.gitignore
-- specifies intentionally untracked files (such as compiled*.pyc
files), which should not typically be committed to git (seeman gitignore
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pythoncli-1.0.2.tar.gz
.
File metadata
- Download URL: pythoncli-1.0.2.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 940445fb2efc9c7bc1f54791b277c9f41933efb1d5836ae8135f7475769aba86 |
|
MD5 | 77127e9a29f4769da9555e3afa7bb655 |
|
BLAKE2b-256 | 644d60391ec0b41b6cb24865ec568bd201caa3a7446293b9bbd459217a6887e1 |
File details
Details for the file pythoncli-1.0.2-py2-none-any.whl
.
File metadata
- Download URL: pythoncli-1.0.2-py2-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/2.7.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06acef7af3d97dc804b8e88e46f9c62298499da8148902a7cb802101aa3e3143 |
|
MD5 | e6e2ae40535031d93dcb8c71e335c2be |
|
BLAKE2b-256 | 04ecbf91a41d09d63bbea7b822b6d4685ed3bf28eede3ff57731225e8d424537 |