Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Simple IoC

Build Status License GPLv3 Python versions

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:

  1. Update the version number in setup.py

  2. Install build tools (if not already installed):

    pip install build twine
    
  3. Build the distribution packages:

    python -m build
    

    This creates both source distribution (.tar.gz) and wheel (.whl) in the dist/ directory.

  4. Verify the build:

    twine check dist/*
    
  5. 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
    
  6. 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)

Table of built distributions (wheels) for simple-ioc 3.2.0
File Interpreter ABI Platform
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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page