Skip to main content

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

  1. ID Allocation: Allocate up to a billion IDs per entity with the option to expand.
  2. 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)
  3. 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

  1. Classes

    • guidgen : All methods of the program are written here
  2. Methods

    • generate_id() : Creates the sqlite database for persistent storage
    • drop_id() : Checks if the table exists
    • logger() : Creates new table, if table doesn't exist in database
  3. 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


Download files

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

Source Distribution

daedal_persistentidgenerator-1.1.5.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

daedal_persistentidgenerator-1.1.5-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file daedal_persistentidgenerator-1.1.5.tar.gz.

File metadata

File hashes

Hashes for daedal_persistentidgenerator-1.1.5.tar.gz
Algorithm Hash digest
SHA256 70d47e3cbd6c4d5f3f91378354569c6c94f98799d04e6ea9ce2641a14a9afd64
MD5 bd6644e53a0d66432b1cef6d80868891
BLAKE2b-256 b13ca94fd788ad05a4d36928ccac6a997125a6a3d811fa8256916cc1e9501f31

See more details on using hashes here.

File details

Details for the file daedal_persistentidgenerator-1.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for daedal_persistentidgenerator-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 350c25aaedcbef1605721fddfc8688b5018e2b422eeaa411a957b74d91114e10
MD5 4116459d9a8ab560b41ceb51e0fd1b28
BLAKE2b-256 ef0ad00a7525e8d6a1a5fc58dde9fc1fd6fb08bb99e0d20f81621e517dda8cc4

See more details on using hashes here.

Supported by

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