This lightweight Python library provides reusable utility functions to simplify common development tasks.
Project description
nurgapy
| \ | |_ _ _ __ __ _ __ _| _ \ _ _
| \| | | | | '__/ _` |/ _` | |_) | | | |
| |\ | |_| | | | (_| | (_| | __/| |_| |
|_| \_|\__,_|_| \__, |\__,_|_| \__, |
|___/ |___/
Small convenience Python library.
Rationality to build this library, that I don't want to copy over this code to multiple projects.
Currently, nurgapy library consists two functions:
tyme- it is a small wrapper function, which is used for measuring execution time of functions. Also works for the class functions.trackbar- it is a simple progress bar, which just works without many imports. Inspired by stackoverflow post. There is well-knowntqdmlibrary, but it prevents user from usingprintstatements. For simple use-cases this progress bar should be enough. There is another nice libraryalive-progress, which does not have this issue and many others. But I just wanted to have some simple progress bar, which lives in the single library with other convenience functions.
Getting started
This project uses Poetry for the package management.
Install Poetry (if not installed)
curl -sSL https://install.python-poetry.org | python3 -
Install dependencies
poetry install
Run the project example
poetry run src/main.py
Installing pre-commit checks
Install pre-commit
poetry run pre-commit install
Pre-commit will run automatically after running git commit.
But it is also possible to run pre-commit checks against all files manually.
Adding --verbose will also print more detailed info. Helpful for debugging test.
poetry run pre-commit run --all-files
Update the pre-commit hooks.
poetry run pre-commit autoupdate
Running tests
Run tests using pytest.
poetry run pytest -v
-s - will print the print() statements. Use it for debug.
Publish a new version
In NurgaPy semantic versioning is used. After pushing a new version, a GitHub Actions workflow will be triggered, which will push a new version to PyPi and will also create a new GitHub Release. In order to publish a new version, apply the next steps:
poetry version patch # 0.0.x
poetry version minor # 0.x.0
poetry version majon # x.0.0
Then create a proper git tag
git tag x.x.x
And push it
git push origin --tags
Roadmap
-
Add basic code -
Add pre-commit hook- Add more rules to pre-commit
-
Add public API to theinit.py -
Add tests - Add tests automation Nox
- Add badges
- test coverage (coveralls)
- Add packaging
- Publish nurgapy to pip
- Add a runner, which automatically publishes a new version to pip
- Add
documentationfolder - Create an
examplesfolder
Progress bar
- Add percentages
- Flexible size
- Progress bar runs in the independent thread
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nurgapy-0.1.1.tar.gz.
File metadata
- Download URL: nurgapy-0.1.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe13a4faecb9d73a80d4a3058917df98b6467957253c936b3444166f207eea18
|
|
| MD5 |
55a556364f5f4d46839f196f58e5ebdd
|
|
| BLAKE2b-256 |
6f34d793d3b6fdc76b6620e637f61d90980f4f1918f6e540459eb4f45c12bcd0
|
Provenance
The following attestation bundles were made for nurgapy-0.1.1.tar.gz:
Publisher:
release.yml on nurgalive/nurgapy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nurgapy-0.1.1.tar.gz -
Subject digest:
fe13a4faecb9d73a80d4a3058917df98b6467957253c936b3444166f207eea18 - Sigstore transparency entry: 163030848
- Sigstore integration time:
-
Permalink:
nurgalive/nurgapy@9896634700534df86714cef5ddb463bfbe3c6443 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/nurgalive
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9896634700534df86714cef5ddb463bfbe3c6443 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nurgapy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: nurgapy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adcdc15664a3e3fb876c88a66b5d3e8840a4256e79d3287aee90b654473e99da
|
|
| MD5 |
2884695f855d15e472202abf00c1cd7f
|
|
| BLAKE2b-256 |
1758f7ae2f80632ee0eb14bf229b5c22eaa2be8d38898372b819ffcf477995b8
|
Provenance
The following attestation bundles were made for nurgapy-0.1.1-py3-none-any.whl:
Publisher:
release.yml on nurgalive/nurgapy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nurgapy-0.1.1-py3-none-any.whl -
Subject digest:
adcdc15664a3e3fb876c88a66b5d3e8840a4256e79d3287aee90b654473e99da - Sigstore transparency entry: 163030850
- Sigstore integration time:
-
Permalink:
nurgalive/nurgapy@9896634700534df86714cef5ddb463bfbe3c6443 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/nurgalive
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9896634700534df86714cef5ddb463bfbe3c6443 -
Trigger Event:
push
-
Statement type: