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 MIT License. See the LICENSE file for details.

Contact

For any questions or suggestions, please contact email@debmishra.me.

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

persistentidgenerator-1.1.3.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

persistentidgenerator-1.1.3-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file persistentidgenerator-1.1.3.tar.gz.

File metadata

  • Download URL: persistentidgenerator-1.1.3.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for persistentidgenerator-1.1.3.tar.gz
Algorithm Hash digest
SHA256 f71700d4aeefe67e7fc6dbdc6cb86a72ff75bdcd9fcf6b0b0f0eea50bf35743e
MD5 f1f5d0cabe63fc0180af7e1114917de7
BLAKE2b-256 ab3521aa0c7d366006e4f0e64bbd4436ef19c1b92553f22b9416fe07f728d257

See more details on using hashes here.

File details

Details for the file persistentidgenerator-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: persistentidgenerator-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/5.15.153.1-microsoft-standard-WSL2

File hashes

Hashes for persistentidgenerator-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 224c376d30a1fd7ca519cd69541ae17439ae2cf114d7d0e307b52f6a0a33095d
MD5 a02c7cc99ca9ae3f5558bd0a0f7d37db
BLAKE2b-256 940b8da31adc9084300721dff07b4a18ca4c1375c98d3fb0340200668d6dc49d

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