This packages allows creating squential ids for financial entities. It's a fairly simple program that allocates 1 billion ids for each entity.
Project description
Sequential ID Generator
This Python program provides a robust solution for generating sequential IDs for various entities. It supports up to a billion IDs per entity with the option to expand further. Additionally, it allows for the deletion and reuse of IDs.
Features
- ID Allocation: Allocate up to a billion IDs per entity with the option to expand.
- Entity Selection: Choose from the following entities for ID generation:
fx: 1 (fx)prices: 2 (hp)static: 3 (sec)index: 4 (idx)benchmarks: 5 (bmrk)holdings: 6 (hld)portfolio: 7 (por)entity: 8 (ent)other:0 (oth)
- ID Deletion and Reuse: Option to delete an ID and have it reused.
Installation
Ensure that you have SLITE_DB_PATH environment variable set. If not it'll store in profile and wont be persistent if you have concurrent users.
Usage
It has a class and multiple methods
-
Classes
guidgen: All methods of the program are written here
-
Methods
generate_id(): Creates the sqlite database for persistent storagedrop_id(): Checks if the table existslogger(): Creates new table, if table doesn't exist in database
-
Examples
- get a unique master id - guidgen.generate_id("fx").masterId
- get a unique numeric id - guidgen.generate_id("fx").numericId
- drop a numeric id - guidgen.drop_id(21,"fx")
- get a log details - guidgen.generate_id("fx").logOuput.stdout_log/stderr_log
Contributing
Contributions are welcome! Please fork the repository and submit a pull request.
License
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Contact
For any questions or suggestions, please contact infra@daedal.org.
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 daedal_persistentidgenerator-1.1.5.tar.gz.
File metadata
- Download URL: daedal_persistentidgenerator-1.1.5.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70d47e3cbd6c4d5f3f91378354569c6c94f98799d04e6ea9ce2641a14a9afd64
|
|
| MD5 |
bd6644e53a0d66432b1cef6d80868891
|
|
| BLAKE2b-256 |
b13ca94fd788ad05a4d36928ccac6a997125a6a3d811fa8256916cc1e9501f31
|
File details
Details for the file daedal_persistentidgenerator-1.1.5-py3-none-any.whl.
File metadata
- Download URL: daedal_persistentidgenerator-1.1.5-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
350c25aaedcbef1605721fddfc8688b5018e2b422eeaa411a957b74d91114e10
|
|
| MD5 |
4116459d9a8ab560b41ceb51e0fd1b28
|
|
| BLAKE2b-256 |
ef0ad00a7525e8d6a1a5fc58dde9fc1fd6fb08bb99e0d20f81621e517dda8cc4
|