Skip to main content

Parse PubChem PUG JSON into xsimple property and safety data.

Project description

x-pug-utils

Parse a PubChem PUG/PUG-View JSON document into the xsimple property and safety schema.

Environment setup

Python 3.10 or newer is required. Create and activate a virtual environment before installing the package:

python -m venv .venv

# Windows PowerShell
.venv\Scripts\Activate.ps1

# macOS/Linux
source .venv/bin/activate

Conda

conda create -n x-pug-utils python=3.12
conda activate x-pug-utils

Install

python -m pip install --upgrade pip
pip install x-pug-utils

# Upgrade to the latest release
pip install --upgrade x-pug-utils

x-pug-utils has no third-party runtime dependencies.

Usage

from x_pug_utils import parse_pug, parse_pug_file

result = parse_pug_file("COMPOUND_CID_2244.json")
# or: result = parse_pug(pug_json_dict)

The package uses only the Python standard library and always returns the xsimple schema.

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

x_pug_utils-0.0.6.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

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

x_pug_utils-0.0.6-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file x_pug_utils-0.0.6.tar.gz.

File metadata

  • Download URL: x_pug_utils-0.0.6.tar.gz
  • Upload date:
  • Size: 32.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for x_pug_utils-0.0.6.tar.gz
Algorithm Hash digest
SHA256 d7369c65a79b6beab11b9ad46147abd175bad6c40dd65c87a131966382b26366
MD5 165cf0397e515b52e90c3214a529cbed
BLAKE2b-256 e5f69e7616a705f333a855b1cdec2cda029d6ffd1056bcf28de8ce72a98baf6c

See more details on using hashes here.

File details

Details for the file x_pug_utils-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: x_pug_utils-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for x_pug_utils-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1e36d342d5922ee9c37804d0b596b300968511bbe4788f6b0ea51b4ade0bf82d
MD5 c5ebd565438e2e1a1f49a7bffccfc6f2
BLAKE2b-256 5c0c4e3b99dd4d7f5f69338e15a47c5ebd25a4a6e9db19217a898c9aea13e260

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