repr_soso
Prints an object all spread out and indented.
Takes an object like this:
{'format': 2, 'versions': ['ARIA', 'Cakewalk', 'LinuxSampler', 'SFZ v1', 'SFZ v2', 'sfizz'], 'headers': [{'name': 'region', 'short_description': 'The basic component of an instrument. An instrument is defined by one or more regions.', 'version': 'SFZ v1'}, {'name': 'group', 'short_description': 'Multiple regions can be arranged...
... and formats it like this:
{
"format" : 2,
"versions" : [
'ARIA',
'Cakewalk',
'LinuxSampler',
'SFZ v1',
'SFZ v2',
'sfizz'
],
"headers" : [
{
"name" : 'region',
"short_description" : 'The basic component of an instrument. An instrument is defined by one or more regions.',
"version" : 'SFZ v1'
},
{
"name" : 'group',
"short_description" : 'Multiple regions can be arranged in a group. Groups allow entering common parameters for multiple regions.',
"version" : 'SFZ v1'
},
...
Goal
My purpose in creating this was to use it to produce good-looking code which can be placed in the source file of another project (sfzen). I had an expensive operation, building up a large dictionary which never changes. Instead of performing it on every invocation, it made sense to just include the definition in the source. Using repr_soso, I wrote the dictionary directly to a file with a .py extension.
Usage:
from repr_soso import Repr
repr = Repr(big_dictionary)
repr.print()
... or ...
repr(big_dictionary).print()
Speed
This package differs from "rich", which already does this, by doing only one thing, and doing it fast. Testing with a large dictionary produced the following:
rich: 2.1802 seconds
repr_soso: 0.1395 seconds
YMMV.
Metadata
Release files for repr-soso 1.0.2
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 | |
|---|---|---|---|---|
| repr_soso-1.0.2.tar.gz | 14.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| repr_soso-1.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 29.3 kB
Release files / repr_soso-1.0.2.tar.gz
| Download URL | repr_soso-1.0.2.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04a4d37dcfab01ce1dbde4911c73fb4da83ac4f8fd647c9e21ccfac2b62a2ba3
|
|
BLAKE2b-256 checksum How to use checksums |
b2ea8ad4f8c29633fee528b43ddee3af36fd01070405c36d1c5aa21c5ae272e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / repr_soso-1.0.2-py2.py3-none-any.whl
| Download URL | repr_soso-1.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
82688432317e39967a4ec66c2f9aadd7b56ca20742c43f674891681862f4ed1f
|
|
BLAKE2b-256 checksum How to use checksums |
f2cccb431620638f5fcdc255bc2df42a22e8fcc1fcf598827ec402881a2ca8c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for repr-soso 1.0.2
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.