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
getinstance-0.7.tar.gz 2.6 kB Details

Built distribution (wheel)

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

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

Release history Release notifications | RSS feed

This release

0.7 This release

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

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