Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
A tiny, secure, URL-friendly, unique string ID generator for Python.
Install Nano ID using pip:
pip install nanoid
The main module uses URL-friendly symbols (A-Za-z0-9_-) and returns an ID with 21 characters (to have a collision probability similar to UUID v4).
from nanoid import generate
generate() # => NDzkGoTCdRcaRyt7GOepg
Symbols -,.()
are not encoded in the URL. If used at the end of a link they could be identified as a punctuation symbol.
If you want to reduce ID length (and increase collisions probability), you can pass the length as an argument.
from nanoid import generate
generate(size=10) # => "IRFa-VaY2b"
Don’t forget to check the safety of your ID length in ID collision probability calculator.
If you want to change the ID's alphabet or length you can use the internal generate module.
from nanoid import generate
generate('1234567890abcdef', 10) # => "4f9zd13a42"
Non-secure API is also available:
from nanoid import non_secure_generate
non_secure_generate('1234567890abcdef', 10)
nanoid-dictionary
with popular alphabets to use.FAQs
A tiny, secure, URL-friendly, unique string ID generator for Python
We found that nanoid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.