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.4.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

getinstance-0.4-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

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