My sample python repo
Project description
amuni_pysample
Looking to up skill and have some fun building a personal AI, I started to get more serious about Python. This repo is part rant, part jotting down the choices I made after reading articles from people who know a lot more.
Using this repo via git
git clone https://github.com/amishamuni/amuni_pysample.git
cd amuni_pysample
python -m venv env : Create a virtual env
.\env\Scripts\activate : Activate the virtual env
python -m main : Invoke and play around modifying what you want
pytest : To run the sample test or any that you add
deactivate : Deactivate virtual environment
Using this repo from TestPyPI
mkdir trial
cd trial
python -m venv env
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps amuni-pysample==x.y.z
TestPyPI doesnt have the pytest and streamlit versions I specify so install them manually using pip
python -m sample.main
A sample repo for python
This template uses a src layout, and will iterate to use the following:
requirements.txt to specify the dependencies required.
pyproject.toml to specify project metadata and build tools in a tool agnostic format.
Black as a code formatter, mypy as a type checker, Ruff as a fast linter, pyroma as a packaging linter.
Build tools with pip as build frontend, setuptools as build backend.
pytest for a test suite.
pre-commit as a pre-commit tool, to automate checks to be run on your code before a commit.
Github actions to automate building, testing and deploying code.
TestPyPI and PyPI to distribute the package as per recommended process, via twine
Further reading
https://github.com/pypa/sampleproject/tree/main
https://packaging.python.org/en/latest/guides/tool-recommendations/
https://packaging.python.org/en/latest/flow/
https://docs.python.org/3/tutorial/index.html
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
Built Distribution
File details
Details for the file amuni_pysample-4.0.1.tar.gz
.
File metadata
- Download URL: amuni_pysample-4.0.1.tar.gz
- Upload date:
- Size: 40.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 050b13a416198e8eb3e2edd691ae23a067a2677c4cb9260f8a9e9e6e8f249cdf |
|
MD5 | 9097efbcdad9ad665a05d83024d9ba62 |
|
BLAKE2b-256 | 4df9068588ff15c4831b95047dee02b9d09fa8b48ee63ec0f068f62e43814a2f |
File details
Details for the file amuni_pysample-4.0.1-py3-none-any.whl
.
File metadata
- Download URL: amuni_pysample-4.0.1-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 362b02a7a77c5f20ab844287e13fa82b10b6b71154e7a8e25f9224256e17e382 |
|
MD5 | fad2a4cc2fd9c301e1e189c96cf33430 |
|
BLAKE2b-256 | 28a66fab9db52a1a01c33effa61ce6fd7f6c14d100c0eec4b9c1ea9f064de726 |