Skip to main content

StaticModel

StaticModel provides tools for modeling and working with tabular constants.

Quick Example

>>> from staticmodel import StaticModel
>>>
>>>
>>> class AnimalType(StaticModel):
...     _field_names = 'name', 'description', 'has_legs'
...
...     DOG = 'Dog', "Man's best friend", True
...     SNAKE = 'Snake', "Man's slithering companion", False
...
...     def walk(self):
...         if self.has_legs:
...             return '{} walking...'.format(self.name)
...         return "{} can't walk.".format(self.name)
...
>>> AnimalType.DOG.walk()
'Dog walking...'
>>> AnimalType.members.get(name='Snake')
<AnimalType.SNAKE: name='Snake', description="Man's slithering companion", has_legs=False>

Documentation

Read the full documentation: https://staticmodel.readthedocs.org/en/latest.

Metadata

Release files for staticmodel 1.2.0

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

Source distribution (sdist)

Source distribution for staticmodel 1.2.0
File Size Uploaded
staticmodel-1.2.0.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for staticmodel 1.2.0
File Interpreter ABI Platform
staticmodel-1.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 20.8 kB

Release files / staticmodel-1.2.0.tar.gz

Download URL staticmodel-1.2.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
91b77ab51481159e731c31fb8dc639ef70fa69b0f16abd3bcb8ab5fb3774ad12
BLAKE2b-256 checksum
How to use checksums
432154d44b96ad46d349fcb8f4b18a2e7f2f07eea9ce1a5340cc5bfb5819feda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / staticmodel-1.2.0-py2.py3-none-any.whl

Download URL staticmodel-1.2.0-py2.py3-none-any.whl
Size 10.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6463c76db86cdd95f54497fda47bcbb8881af2b99ece7e96b27187556d58e348
BLAKE2b-256 checksum
How to use checksums
61b546729664b70840ad0347436ed3c417d6beb6124b81d1acc496d0c3dd25af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.5

2 release files

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

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