This project has been archived by its maintainers, and is no longer receiving any updates.
Random ObjectId
Motivation
This is a toy project without any outlandish goals. Occasionally I
needed a MongoDB ObjectID for a unit test. This saves a DB query,
starting mongo locally, writing more than a line of Python, or
visiting a website. I also wanted to learn more about writing &
deploying Python packages.
Dependencies
None
Supports
py36+. See GitHub workflow here.
Installation
$ pip install random-object-id
Usage
$ random_object_id -h
usage: random_object_id [-h] [-l]
Generate a random MongoDB ObjectId
optional arguments:
-h, --help show this help message and exit
-l, --longform prints the ID surrounded by ObjectId("...")
from random_object_id import generate
generate() # => '5ecd3bbf875e60b4166f6699'
Examples
$ random_object_id
55348611a56c10449ab80a4f
$ random_object_id -l
ObjectId("553486125ed592a10c4e8e6b")
Metadata
Release files for random-object-id 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| random_object_id-2.0.0.tar.gz | 3.1 kB | Without provenance | Details for random_object_id-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| random_object_id-2.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for random_object_id-2.0.0-py2.py3-none-any.whl |
Total release size: 6.6 kB
Release files / random_object_id-2.0.0.tar.gz
| Download URL | random_object_id-2.0.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52800a90ec30e5d6a1e5e1f29a1295028816ac5a673793ec95f2e338c7dbab61
|
|
BLAKE2b-256 checksum How to use checksums |
f90aa82b6822abd80e0bef2972cf81077993e311af238f1ad3cf144316eb9a4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10
|
Release files / random_object_id-2.0.0-py2.py3-none-any.whl
| Download URL | random_object_id-2.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
9fff59bf6c444601d2033c0d28cbee7ec5c11ae8e978081f706d7be16fd96299
|
|
BLAKE2b-256 checksum How to use checksums |
d1315c5e47cd0c06b074dc1bd17eff38a6700dc3c1b9f7a501767e35efcd7a4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10
|
Security for random-object-id 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.