Skip to main content

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

Project description

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

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

mongojuuid-0.1.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mongojuuid-0.1.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file mongojuuid-0.1.2.tar.gz.

File metadata

  • Download URL: mongojuuid-0.1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.5 Darwin/20.6.0

File hashes

Hashes for mongojuuid-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7a96dfbe27401544407dd35abac6762b52ebb2468ce90c28b07ba9705aafcbf3
MD5 9d9e44ff4603c110288a1c8c134fc0a2
BLAKE2b-256 92356dc005fb8168044e05f377ba9bb54cbbc23862f1a7d2023aa873c5ce6d0e

See more details on using hashes here.

File details

Details for the file mongojuuid-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mongojuuid-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.5 Darwin/20.6.0

File hashes

Hashes for mongojuuid-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8223398f72716f3dfd386e7479b0a23837cdf868ef32af3401d7291a4acb1d9e
MD5 c465d3eab0056e993a311dc64a64384b
BLAKE2b-256 c36e43b046b6106188aa99f8c0ea71e7d0055b2ee81562dc896c60addea73713

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page