potc_dict
A simple demo of potc plugin, which can make the dict prettier.
Installation
You can simply install it with pip command line from the official PyPI site.
pip install potc-dict
Or install this plugin by source code
git clone https://github.com/potc-dev/potc-dict.git
cd potc-dict
pip install .
Effect show
We prepare a python script named test_data.py, like this
import math
b = {
'a': {'a': 3, 'b': None, 'c': math.e},
'b': (3, 4, 'dfg'),
'x0': {'a': 3, '02': 4, None: 2},
}
Before the installation mentioned above, we try to export the b in test_data.py by the following CLI command
potc export -v 'test_data.b'
We can get this dumped source code.
import math
__all__ = ['b']
b = {
'a': {
'a': 3,
'b': None,
'c': math.e
},
'b': (3, 4, 'dfg'),
'x0': {
'a': 3,
'02': 4,
None: 2
}
}
BUT, after the installation, we try the CLI command which is exactly the same again, we get the new code
import math
from builtins import dict
__all__ = ['b']
b = dict(a=dict(a=3, b=None, c=math.e),
b=(3, 4, 'dfg'),
x0={
'a': 3,
'02': 4,
None: 2
})
That is all of this demo. When you need to build your own plugin, maybe this demo can help you 😄.
Metadata
Release files for potc-dict 0.0.3
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 | |
|---|---|---|---|---|
| potc-dict-0.0.3.tar.gz | 7.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| potc_dict-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / potc-dict-0.0.3.tar.gz
| Download URL | potc-dict-0.0.3.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93ed9e626777d52083b00578f6bc4e364f7c1f26641e60043f5fa2819f6eae72
|
|
BLAKE2b-256 checksum How to use checksums |
df040d95370342afdd8dbe779d1ca986383054c052095966e2bec186ed66d158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / potc_dict-0.0.3-py3-none-any.whl
| Download URL | potc_dict-0.0.3-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7263f780d102fef52a147f453dcbb458bdb4d14b001ed8a3c79491fca2345b7f
|
|
BLAKE2b-256 checksum How to use checksums |
3657c23f7f797dfd788b1f3dfa0fcf70fbcc95c9bcf2ab8ea0784d9375cebc7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for potc-dict 0.0.3
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.