Skip to main content

oList

A Python 'Object List'. It's basically your standard python list that additionally lets you attach data to it that doesn't affect the actual list items itself.
Treat the oList as you would a normal list:
my_list = oList([-10,3,4,-11,7,14])
my_list.sort()
for list_item in my_list:
    print(str(list_item))

oList Methods:

oList.attach('data') # can be of any type
oList.get_attachments() # returns a list or the object itself if the attachments are only 1
oList.as_dict(_attachments=True) # returns a dict, access values being index, _attachment=True will add attachment data to the dict
oList.as_tuple() # returns tuple

Example Usage:

intel_list = oList([
    'i5-9600k',
    'i9-10910',
    'i9-10900K',
]).attach({
    'carrier': 'Intel',
    'description': 'A nice little list of some intel Cpus.'
})

ryzen_list = oList([
    'Ryzen 3 1200',
    'Ryzen 5 1400',
    'Ryzen 5 3600x'
]).attach({
    'carrier': 'AMD',
    'description': 'A nice little list of some Ryzen Cpus.'
})

cpu_list = oList([intel_list, ryzen_list]).attach('List of Intel and Ryzen Cpus')

# .... later on in the program ....

print("--- " + cpu_list.get_attachments() + " ---\n")

for cpus in cpu_list:
    print(cpus.get_attachments())
    for cpu in cpus:
        print(cpus.get_attachments()['carrier'] + ' - ' + cpu)
    print('')


# OUTPUT:
# --- List of Intel and Ryzen Cpus ---
#
# {'carrier': 'Intel', 'description': 'A nice little list of some intel Cpus.'}
# Intel - i5-9600k
# Intel - i9-10910
# Intel - i9-10900K
#
# {'carrier': 'AMD', 'description': 'A nice little list of some Ryzen Cpus.'}
# AMD - Ryzen 3 1200
# AMD - Ryzen 5 1400
# AMD - Ryzen 5 3600x

Metadata

Release files for oList 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oList 0.0.3
File Size Uploaded Provenance Actions
oList-0.0.3.tar.gz 2.7 kB Without provenance Details for oList-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oList 0.0.3
File Interpreter ABI Platform Actions
oList-0.0.3-py3-none-any.whl Python 3 none any Details for oList-0.0.3-py3-none-any.whl

Total release size: 5.3 kB

Release files / oList-0.0.3.tar.gz

Download URL oList-0.0.3.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5b524971c6ded566fb92bd8ddf93c771a303446721a460028157d63abb3c8e48
BLAKE2b-256 checksum
How to use checksums
5bbaafd8ae79c75b20416fc3768081270be66b3a9a4333c9a5373cf573760b9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Release files / oList-0.0.3-py3-none-any.whl

Download URL oList-0.0.3-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba955b64e9ab29216555b8ae509873c718fb0ad3d362fdb1844f9f48b8677e95
BLAKE2b-256 checksum
How to use checksums
624ce54ac5f3ec9d0fbc96d4a4950432e69edab31f1356bb6c017181f5dbb5ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Security for oList 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page