Skip to main content

Sophisticate Hashed Data Structures

Project description

hashall

PyPI version License: MIT

This library was created to use indexed data structures such as list, tuple, str, bytes, and bytearray with keys like those used in dict (hash table)

Installation

You can install hashall via pip:

pip install hashall

Usage

hlist

from hashall import hlist


x = hlist([1, 2, 3, 4, 5, 6])
print(x[3])
print(x[+3])
print(x["3"])
print(x["+3"])
print(x[-3])
print(x["-3"])
print(x["three"])
print(x["+three"])
print(x["-three"])

Output

4
4
4
4
4
4
4
4
4

htuple

from hashall import htuple


x = htuple([1, 2, 3, 4, 5, 6])
print(x[3])
print(x[+3])
print(x["3"])
print(x["+3"])
print(x[-3])
print(x["-3"])
print(x["three"])
print(x["+three"])
print(x["-three"])

Output

4
4
4
4
4
4
4
4
4

hstr

from hashall import hstr


x = hstr("hashall")
print(x[3])
print(x[+3])
print(x["3"])
print(x["+3"])
print(x[-4])
print(x["-4"])
print(x["three"])
print(x["+three"])
print(x["-four"])

Output

h
h
h
h
h
h
h
h
h

hbytes

from hashall import hbytes


x = hbytes(b"hashall")
print(x[3])
print(x[+3])
print(x["3"])
print(x["+3"])
print(x[-4])
print(x["-4"])
print(x["three"])
print(x["+three"])
print(x["-four"])

Output

104
104
104
104
104
104
104
104
104

hbytearray

from hashall import hbytearray


x = hbytearray(b"hashall")
print(x[3])
print(x[+3])
print(x["3"])
print(x["+3"])
print(x[-4])
print(x["-4"])
print(x["three"])
print(x["+three"])
print(x["-four"])

Output

104
104
104
104
104
104
104
104
104

Note

You can use all the methods you've been using with these data structures

License

This project is licensed under the MIT LICENSE - see the LICENSE for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hashall-1.0.3.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

hashall-1.0.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file hashall-1.0.3.tar.gz.

File metadata

  • Download URL: hashall-1.0.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for hashall-1.0.3.tar.gz
Algorithm Hash digest
SHA256 de881e4069bb6eaadc970fe33be9ca941ef69dd0cc24b06dc48c291d0d92fbc2
MD5 1607a99fb2f29a68915ba322f4fb354c
BLAKE2b-256 c85f824e69c4dc4f8927cc36f139735ddc6fdc2959cfd094905543b9bdd9e381

See more details on using hashes here.

File details

Details for the file hashall-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: hashall-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for hashall-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7c27abe29358b7ed3871d8a6616ef13591d95b3c27ee93420acb7b118c8fbe33
MD5 845ad2338207f8a1aa3a61ed29a75c76
BLAKE2b-256 8c17e3cdd21abf34a9d081752942ccc4d00896392ec158407bd0c9ed9712185d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page