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.6.tar.gz
(1.6 kB
view details)
Built Distribution
File details
Details for the file getinstance-0.6.tar.gz
.
File metadata
- Download URL: getinstance-0.6.tar.gz
- Upload date:
- Size: 1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7009f4ee0b0af75b2ca05638b004144fc67e21dda6b6f0ffebcf4d5d295a69b |
|
MD5 | 899ce70e71470bf35222565cb30547f2 |
|
BLAKE2b-256 | ed532ad9ebd8832f412c8979f013c1325f5bf680d77d9c13a8d62851b55c1716 |
File details
Details for the file getinstance-0.6-py3-none-any.whl
.
File metadata
- Download URL: getinstance-0.6-py3-none-any.whl
- Upload date:
- Size: 1.5 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 091b266e132aae9892575c90b6643599fa17a6ec97e2fa9ad33755073b7414f2 |
|
MD5 | ce814eb531bdbfe834108d1571208c18 |
|
BLAKE2b-256 | da245220910b8b120112060063d8f74bc6148e81576c91ad1f278abddb2d829d |