Python example project. Example of:
- Entry point (
app.py
) - module (
pyexample
) - module with resources (
pyexample/resources
) - dependencies via
requirements.txt
(used insetup.py
) - setuptools (
setup.py
,MANIFEST.in
) - unit tests via standard
unittest
module - continuous integration via Travis CI
sudo dnf install pip3
sudo pip3 install git+https://github.com/Kedrigern/pyexample.git
dnf
is install software for Fedora. On other OS use another app.
After git url you can specify tag:
sudo pip3 install git+https://github.com/Kedrigern/[email protected]
pyexample
With any parameter output is quit different:
pyexample --foo
cd <git-repository-with-project>
python3 -m unittest
If pip
is not enough, you can create distribution packages.
./setup.py bdist_rpm
./setup.py --command-packages=stdeb.command bdist_deb
├── DESCRIPTION.rst
├── MANIFEST.in
├── pyexample
│ ├── hello.py
│ ├── __init__.py
│ ├── __main__.py
│ └── resources
│ ├── config.ini
│ ├── dir
│ │ └── resource3.dat
│ ├── __init__.py
│ ├── resource1.dat
│ └── resource2.dat
├── readme.md
├── requirements.txt
├── run
├── setup.cfg
├── setup.py
└── test
├── __init__.py
└── test_hello.py