Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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

Release History

This version
History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
random_object_id-1.0.4-py2.py3-none-any.whl
(4.4 kB) Copy SHA256 Hash SHA256
Wheel py2.py3 Apr 24, 2015
random-object-id-1.0.4.tar.gz
(2.9 kB) Copy SHA256 Hash SHA256
Source None Apr 24, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting