A helper class to programaticly build a Meta Class
Install
git clone https://gitlab.com/craigukaea/class-maker.git
cd class-builder
./Install
Use
To build a class equivelent to the following:
class Foo:
def bar():
print("Hello world")
Use:
maker = ClassMaker()
maker.setClassName('Foo')
maker.addFunction('bar', lambda : print("Hello World!"))
#make the class
foo = maker.makeClass()
##test the functions
foo.__init__()
foo.bar()
Example
from ClassMaker import ClassMaker
if __name__ == "__main__":
maker = ClassMaker()
maker.setClassName('Foo')
maker.addFunction('bar', lambda : print("Hello World!"))
maker.addVariable('baz', 5)
maker.addFunctionToInitialiser(lambda : print("Initialising"))
maker.addFunctionToInitialiser(lambda : print("!"))
foo = maker.makeClass()
foo.__init__()
foo.bar()
print(foo.baz)
Metadata
Release files for ClassMaker 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ClassMaker-0.1.tar.gz | 2.1 kB | Without provenance | Details for ClassMaker-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ClassMaker-0.1-py3-none-any.whl | Python 3 | none | any | Details for ClassMaker-0.1-py3-none-any.whl |
Total release size: 4.8 kB
Release files / ClassMaker-0.1.tar.gz
| Download URL | ClassMaker-0.1.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b7e1725be135f6b6c5cb86e7fd4c6750f6d8305aa9f2663666815f5fdc34551
|
|
BLAKE2b-256 checksum How to use checksums |
be99a4b116a700d212ca620f2aa0c9bde95f5c6e95c09ed6cf87ec95b981babc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
|
Release files / ClassMaker-0.1-py3-none-any.whl
| Download URL | ClassMaker-0.1-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8a51ef52a752aeec372c91362e09913980e2694613b80598c78ac537b1aa219
|
|
BLAKE2b-256 checksum How to use checksums |
52679687e57d35f7c56ec70bbf307a6b7df6414f7d59d662c68a61966c5123f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
|
Security for ClassMaker 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.