py-bson / bson

Independent BSON codec for Python that doesn't depend on MongoDB.
Other
442 stars 82 forks source link

ObjectId from scratch #68

Open Parkayun opened 7 years ago

Parkayun commented 7 years ago

This project should provide (rewrite) ObjectId from scratch. (In #39 , #66 ObjectId added from mongodb. )

amcgregor commented 5 years ago

I clean-room'd my own ObjectId implementation some time ago for use as session identifiers. (The included timestamp is just too handy for fast-rejection, hardware identifier useful for tracking origin. MIT licensed, Python 2 and 3 compatible, feel free to borrow/steal. ;) [Edited to add: I may some day update it away from MD5, but consistency with existing stored IDs is highly important!]