Skip to main content

Class Tools for Python

Project description

Convenience tools for working with Python classes.

Simplified subclassing:

class MyClass:
    def __init__(self, *args, **kwargs):
        pass  # do whatever

# subclass with presets
MySubClass = argumented_subclass(MyClass, 'MySubClass', arg1='value', arg2=4)

Various descriptors:

class Thing:
    Red = ArgumentedSubclass(color='red')
    book = AutoProperty(has='pages')
    def __init__(self, color=None, has=None):
        self.color = color
        self.has = has

Thing.Red  # is a subclass of Thing and is 'red'  # is an instance of Thing (and Thing.Red), is 'red' and has 'pages'

See the full documentation at


pip install classical


make test

You may need to install [develop] extras to run tests

Generating docs

make docs

You may need to install [develop] extras to generate docs

Project details

Download files

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

Files for classical, version 2.1.0
Filename, size File type Python version Upload date Hashes
Filename, size classical-2.1.0.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page