A Python package for generating unique IDs using the Prime Extended Decimal Index Listing (PEDIL) method.
Project description
PEDIL
PEDIL (Prime Extended Decimal Index Listing) is a Python package designed for generating unique IDs using prime numbers. It leverages an innovative indexing method that uses prime numbers to uniquely identify software components.
Features
- Unique ID Generation: Generate unique IDs using prime numbers.
- Scalable: Supports multiple levels of depth for ID generation, offering a vast number of unique identifiers.
- Efficient: Optimized for performance with manageable chunk sizes for prime generation.
Installation
You can install the package using pip:
pip install pedil
Usage
Here is a simple example demonstrating how to use PEDIL to generate unique IDs.
from pedil import PEDIL
# Create an instance of the PEDIL class
pedil = PEDIL()
# Generate unique IDs
id1 = pedil.get_or_create_prime_id("1")
id2 = pedil.get_or_create_prime_id("1,1")
id3 = pedil.get_or_create_prime_id("2,3,5")
# Print the generated IDs
print(f"ID for '1': {id1}")
print(f"ID for '1,1': {id2}")
print(f"ID for '2,3,5': {id3}")
Prime Extended Decimal Index Listing (PEDIL) Annotation System
The PEDIL notation uses commas to separate different levels. Each level represents a multiplier for the corresponding power of the base array size. The notation allows for scalable and flexible ID generation.
For example, consider the notation (1,3,5) with a base array size of N primes:
1 * N^2
3 * N^1
5 * N^0
The final prime index is the sum of these values. Example Notations
Single Level: "1" -> Represents the 1st prime.
Two Levels: "1,1" -> Represents the sum of 1 * N^1 + 1 * N^0.
Three Levels: "2,3,5" -> Represents the sum of 2 * N^2 + 3 * N^1 + 5 * N^0.
Maximum Unique IDs Using the First 78,498 Primes (Primes up to 1 Million)
1 Level of Depth: 78,498 unique IDs
2 Levels of Depth: 78,498^2 = 6,161,251,004 unique IDs
3 Levels of Depth: 78,498^3 = 4,847,646,381,177,992 unique IDs
Performance Considerations
1 Level of Depth: Suitable for most applications, providing a large number of unique IDs efficiently.
2 Levels of Depth: Suitable for applications requiring even more unique IDs, with manageable computational overhead.
3 Levels of Depth: Provides an enormous number of unique IDs but may involve significant computational time and resources.
Applications and Use Cases Practical Use
For most real-world applications, using 1 or 2 levels of PEDIL notation should be sufficient to provide a vast number of unique IDs efficiently without excessive computational overhead. Big Data and Machine Learning
For applications like big data and machine learning, where handling trillions of tokens and long processing times are common, PEDIL can scale to higher levels and larger base arrays, offering unique IDs in the trillions. License
This project is licensed under the MIT License.
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 pedil-0.1.0.tar.gz.
File metadata
- Download URL: pedil-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76800b6a73d72d9c59332dcc0e399064766966279d125126202e1b2acdc7abc6
|
|
| MD5 |
bd47b5defa004419bc9ba83f0cd2d25f
|
|
| BLAKE2b-256 |
29747aa64fe0e7f0cac9a03895506ca7c60cc96aea74450e475685cd710bdbb7
|
File details
Details for the file pedil-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pedil-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e77e363ba6f18f6dca91ffcda3b6bebb70f1eaf435fe8382f9808702b60416d7
|
|
| MD5 |
c71a4e8d43b36ea8ec44a3e1696eb66b
|
|
| BLAKE2b-256 |
5bbdf3405bb29df9dfb9cb153752625f5475abe25ff515cfab8925e94c8e9df5
|