Skip to main content

Generate a random MongoDB ObjectId.

Project description

Motivation

This is a pretty simple project without any outlandish goals. Occasionally I needed a MongoDB ObjectID for a unit test. This saves a query or visiting a website. I also wanted to learn more about writing & deploying Python packages.

Dependencies

None.

Supports

Python 2.7 and 3.2+. See .travis.yml here for the full breakdown.

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("...")

Examples

$ random_object_id
55348611a56c10449ab80a4f
$ random_object_id -l
ObjectId("553486125ed592a10c4e8e6b")

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

random-object-id-1.0.4.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

random_object_id-1.0.4-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file random-object-id-1.0.4.tar.gz.

File metadata

File hashes

Hashes for random-object-id-1.0.4.tar.gz
Algorithm Hash digest
SHA256 8fca5a28a46e71614b4cb7f9e2d2f6a36addc153ff3b0eb304bb8ead6241c083
MD5 bdec4260c76a05159b2cf80c9b1e5868
BLAKE2b-256 d31472a5c23b748b6097eae3196595cf13e1bcd309c89b1a48db65790308abeb

See more details on using hashes here.

File details

Details for the file random_object_id-1.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for random_object_id-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 61242ac4f6db86d31ee1001472d8e69a12d26ab77165a4896aec748caf9e0888
MD5 346a5a0a8c47c1de897d585a47a89f7e
BLAKE2b-256 5e22bd1d7fba43befac3cf90ca942f73bae81796ef263c98f401c969e2eec12a

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