Skip to main content

getinstance

Project description

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')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

getinstance-0.7.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

getinstance-0.7-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file getinstance-0.7.tar.gz.

File metadata

  • Download URL: getinstance-0.7.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.20.1 CPython/3.11.10 Linux/6.11.6-2-default

File hashes

Hashes for getinstance-0.7.tar.gz
Algorithm Hash digest
SHA256 9ff50ba6436f0063f68e76994cd759da351016a62729b297d2c27a5afbf1b0ef
MD5 8448a3c84da59b5e38e31345a87b60da
BLAKE2b-256 d6970e5f97c956e619663575777be76f269b97ec40291073c8bf1e5483e4cb2f

See more details on using hashes here.

File details

Details for the file getinstance-0.7-py3-none-any.whl.

File metadata

  • Download URL: getinstance-0.7-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.20.1 CPython/3.11.10 Linux/6.11.6-2-default

File hashes

Hashes for getinstance-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 965108f0b2c33adcc52131ab16640985d30414f4b1dfd9082191eaa3dc5cd4a3
MD5 71185b84b11c4e98439d114d8e2f9205
BLAKE2b-256 8f124d7c4899d3b3997f32c392d07a0bb94f9560e32eacbf3ed9a61ad1c393ba

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page