Skip to main content

Ordered Hash Set

https://travis-ci.com/buyalsky/ordered-hash-set.svg?branch=master PyPI

ordered-hash-set is data structure that stores immutable unique elements. Unlike built-in set in python, it also keeps the insertion order.

Installation

Install via pip:

pip install ordered-hash-set

Or install from source:

python3 setup.py install

Basic Usage

from ordered_hash_set import OrderedSet

s = OrderedSet()

s.add("London")
s.add("Tokyo")
# you can add multiple entries at once, like this:
s.update("Paris", "Istanbul")
s.add("London")
s.remove("Tokyo")

print(s) # prints: OrderedSet(London, Paris, Istanbul)

# Thanks to the hashing. Time complexity of checking
# if an element present in a collection is O(1).
# Which is faster than regular list: O(n).
if "Paris" in s:
  print("Paris is in the set.")

# It is also possible, but not recommended due to inefficiency,
# to get the item by index:
assert s[2] == "Istanbul"

API Documentation

Please see API Reference Page

Metadata

Release files for ordered-hash-set 0.1.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 ordered-hash-set 0.1.3
File Size Uploaded Provenance Actions
ordered-hash-set-0.1.3.tar.gz 5.3 kB Without provenance Details for ordered-hash-set-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ordered-hash-set 0.1.3
File Interpreter ABI Platform Actions
ordered_hash_set-0.1.3-py3-none-any.whl Python 3 none any Details for ordered_hash_set-0.1.3-py3-none-any.whl

Total release size: 10.0 kB

Release files / ordered-hash-set-0.1.3.tar.gz

Download URL ordered-hash-set-0.1.3.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
be403fc485eb6ec5314855efd13ab593c46b87746ff6cd14a91c010721af54dc
BLAKE2b-256 checksum
How to use checksums
5af881b896cb5d2d2a3fdba4dbf5f061c34f92f9cf64e438d27d759b5befd938
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.7

Release files / ordered_hash_set-0.1.3-py3-none-any.whl

Download URL ordered_hash_set-0.1.3-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ecea1a1f39cf10cb0cf9ec0064a91a7e85de8d9d441cc2d3d76ec5b1d181c3e
BLAKE2b-256 checksum
How to use checksums
fc3c43823dd1958e8f3c61a0ab2236dde61a0573dd735785908ac706574dd1f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.7

Security for ordered-hash-set 0.1.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