Skip to main content

Installation

pip install getinstance

Usage

from getinstance import InstanceManager

class Country:
    instances = InstanceManager()
    
    def __init__(self, name):
        self.name = name
        
    def hello(self, username):
        print(f'hello, {username} from {self.name}')
            
au = Country('Australia')
ru = Country('Russia')

print(list(Country.instances.all()))
print(Country.instances.get(name='Australia')) 
Country.instances.filter(name='Russia').hello(username='Alice')

Metadata

Release files for getinstance 0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for getinstance 0.7
File Size Uploaded Provenance Actions
getinstance-0.7.tar.gz 2.6 kB Without provenance Details for getinstance-0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for getinstance 0.7
File Interpreter ABI Platform Actions
getinstance-0.7-py3-none-any.whl Python 3 none any Details for getinstance-0.7-py3-none-any.whl

Total release size: 5.3 kB

Release files / getinstance-0.7.tar.gz

Download URL getinstance-0.7.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9ff50ba6436f0063f68e76994cd759da351016a62729b297d2c27a5afbf1b0ef
BLAKE2b-256 checksum
How to use checksums
d6970e5f97c956e619663575777be76f269b97ec40291073c8bf1e5483e4cb2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.20.1 CPython/3.11.10 Linux/6.11.6-2-default

Release files / getinstance-0.7-py3-none-any.whl

Download URL getinstance-0.7-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
965108f0b2c33adcc52131ab16640985d30414f4b1dfd9082191eaa3dc5cd4a3
BLAKE2b-256 checksum
How to use checksums
8f124d7c4899d3b3997f32c392d07a0bb94f9560e32eacbf3ed9a61ad1c393ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.20.1 CPython/3.11.10 Linux/6.11.6-2-default

Security for getinstance 0.7

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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