Interface2.py
A very starting implementation of typescript interfaces in python! I was not satisfied with the dataclasses in python, so I attempted to make something similar to typescript interfaces !! My original plan was to do something like typechat in python, but I realized I needed something better than dataclasses.
The decorators are used to add more functionality to the code. The two current ones are one to make the interface immutable and the other to make it able to take multiple types as a type. I am expecting a TON of bugs, so please lmk if there are any!
To use it, you can clone the repo and then import the IF4 (the main file).
Then, you could do the following:
@multiple
class MyInterface(IF4.Interface):
_properties = {
"name": str,
"age": (int, float)
}
You could wrap them with the decorators too! IF you have ANY questions, please leave an issue and ill be happy to get back to you.
This is one of my first public projects! If anyone has any suggestions for changes/improvements/anything please let me know!!
please see the examples folder for examples of how to use it
Metadata
Release files for Interface2py 0.0.5
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 |
|---|---|---|---|---|
| Interface2py-0.0.5.tar.gz | 9.2 kB | Without provenance | Details for Interface2py-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| Interface2py-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for Interface2py-0.0.5-py3-none-any.whl |
Total release size: 20.7 kB
Release files / Interface2py-0.0.5.tar.gz
| Download URL | Interface2py-0.0.5.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bfb0cc9d589aab90ef5e3ab5921fb305dc92a73a537cd1d663c3ee88fffbc35
|
|
BLAKE2b-256 checksum How to use checksums |
796f7eb33d772c26a994cca595238f1333048609910dab27db3eb2b90a945e09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / Interface2py-0.0.5-py3-none-any.whl
| Download URL | Interface2py-0.0.5-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3a33a0e959f80b3aa835c1a0a09d9bb91f7d2726762fae66dfe5aefe3e495ef
|
|
BLAKE2b-256 checksum How to use checksums |
f820f1f629bf06ebdf615c0b6ee47b3977b3c58c4b0d5cd930cc0403e467ace3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Security for Interface2py 0.0.5
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.