This project has been archived by its maintainers, and is no longer receiving any updates.
Simple IoC
Install
pipenv install simple-ioc
or
pip install simple-ioc
Usage
In order to have the IoC (Inversion of Control) working in your application, you must register your services in the IoC container:
from simple_ioc import Container
class AService:
# Your service implementation comes here
Container().register('an_identifier', lambda: AService())
Then, from any point in your application, you can retrieve the service by calling get:
a_service = Container().get('an_identifier')
Publishing to PyPI
Follow these steps to publish a new version of the package to PyPI:
-
Update the version number in
setup.py -
Install build tools (if not already installed):
pip install build twine
-
Build the distribution packages:
python -m build
This creates both source distribution (.tar.gz) and wheel (.whl) in the
dist/directory. -
Verify the build:
twine check dist/*
-
Upload to PyPI using twine:
twine upload dist/*
Note: Use an API token instead of username/password. Configure it in
~/.pypirc:[pypi] username = __token__ password = pypi-YOUR-API-TOKEN-HERE
-
Clean up the build artifacts (optional):
rm -rf build/ dist/ *.egg-info/
Best Practices
-
Use version tags: After publishing, tag the release in git:
git tag -a X.Y.Z -m "Release X.Y.Z" git push origin --tags
Prerequisites
- You need a PyPI account with the appropriate permissions to upload this package
Metadata
Release files for simple-ioc 3.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_ioc-3.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / simple_ioc-3.2.0-py3-none-any.whl
| Download URL | simple_ioc-3.2.0-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61de2038895cb393831b13dd24eedd1de08c0d1ac9f1720c2cea22314467248d
|
|
BLAKE2b-256 checksum How to use checksums |
a6267d3655198a871765bb0dfa6271c6f7a95c19aefe594fb1fa7514774a93cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.19
|
Security for simple-ioc 3.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.