Socket
Book a DemoInstallSign in
Socket

mongojuuid

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongojuuid

CLI to convert BinData Subtype 3 to JUUID and vice-versa

0.1.2
pipPyPI
Maintainers
1

Mongo Java UUID Converter

Tool to convert Mongo BinData format to Java UUIDs and vice-versa. It behaves like the Java Mongo Driver which transmits the bytes of the most and least significant bits in little endian format.

I used this snippet from the Mongo C# Driver as reference. I added some comments to explain the bitwise operations if you want to take a look into the source code.

Prerequisites

Python 3.8 installed.

Installation

For End-User

Use Pipx to download and install the application in a virtual environment or do it yourself with Pip and virtualenv:

# use either pipx
pipx install --pip-args=--pre mongojuuid==0.1.1

# or alternatively pip 
python3 -m pip install --pre mongojuuid==0.1.1

Usage

CLI

The python installation ships with an executable named mongojuuid. Alternatively use python3 -m mongojuuid

Convert to Java UUID

>mongojuuid to-uuid 'BinData(3, "gJZnXl0vT+OXdGUUfuRraQ==")'
e34f2f5d-5e67-9680-696b-e47e14657497

Convert to BinData

>mongojuuid to-bindata e34f2f5d-5e67-9680-696b-e47e14657497
BinData(3, "gJZnXl0vT+OXdGUUfuRraQ==")

Keywords

mongo

FAQs

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.