RayID is a generated code that we use to track logs, posts or events. You can generate your own rayid, but we made your job easier!
In this instructure you will learn about how to use this package in your apps.
I created rayid for JavaScript too.
How to install RayID? To install this package, use pip or pipenv.
$ pip3 install rayid
# Or
$ pipenv install rayid
So, import the package.
from rayid import RayID
rayid = RayID("digit")
Now create your instance with what kind of rayid you want.
- digit: Numbers
- lower: Alphabet in lower case.
- upper: Alphabet in upper case.
- all: Combine of all types.
No type means all combined togather.
rayid = RayID("digit")
Only one method! gen(len)
.
in gen(len) just say the length.
There is no limit :)
id = rayid.gen(25);
print(id); # 9514992619709220193874433
Create common instances.
all = RayID("all"); # All values
str = RayID("lower"); # Loercase generator
int = RayID("digit"); # Only int generator
Now use them:
print(all.gen(10)); # Z*jVQ3c:+H
print(str.gen(10)); # ksixvpqohi
print(int.gen(10)); # 4748182066
All done!
If you want to develop the package, it is so simple. just follow steps below.
- Clone the project
- Start changing!
Before you start: Remember the base or code are stored in
rayid/rayid.py
. You need to edit there.
To clone the project, you need to have git installed. Ok, now clone it same as command below.
$ git clone https:#github.com/BlackIQ/rayid
To change package or anything, your need a testing environment to use linked package. Just change rayid/rayid.py
.
Your test app is linked. Change anything in package and test it in test.py
file.