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.4.tar.gz (29.1 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.4-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: x_pug_utils-0.0.4.tar.gz
  • Upload date:
  • Size: 29.1 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.4.tar.gz
Algorithm Hash digest
SHA256 19f34181bc250e1c619b701ed5f10fa7b818f4f708b8d2b310582b5eef72278f
MD5 a55fabbc4ec6053871d06dd5be3b5b3f
BLAKE2b-256 5fefa197d14f266a4a72226f2843c7f1e99cd8902374238735da52df2018475b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: x_pug_utils-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 29.0 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 29ca63fe4e48b6b2ac6ccac69c96e1ebd779bbd2ff3a241d1dd47fd06a3528fc
MD5 794323cd218aba5b417a0946f9108312
BLAKE2b-256 ddba759966dfcafa837ad5af1f89b77740cf40ca4c723c54a8c0589bc4a017ee

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