Sophisticate Hashed Data Structures
Project description
hashall
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de881e4069bb6eaadc970fe33be9ca941ef69dd0cc24b06dc48c291d0d92fbc2
|
|
| MD5 |
1607a99fb2f29a68915ba322f4fb354c
|
|
| BLAKE2b-256 |
c85f824e69c4dc4f8927cc36f139735ddc6fdc2959cfd094905543b9bdd9e381
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c27abe29358b7ed3871d8a6616ef13591d95b3c27ee93420acb7b118c8fbe33
|
|
| MD5 |
845ad2338207f8a1aa3a61ed29a75c76
|
|
| BLAKE2b-256 |
8c17e3cdd21abf34a9d081752942ccc4d00896392ec158407bd0c9ed9712185d
|