Skip to main content

dgc-core

Shared Python utilities and domain types for DGC services. The distribution is named dgc-core; the Python package is dgc_core. Requires Python 3.10 or later.

This repository combines opticedge-cloud-utils-python (opticedge_cloud_utils 1.0.33) and opticedge-types-python (opticedge_types 1.0.53). Existing utility behavior, public exports, enum values, and eligibility constants are preserved.

Installation

Install from this checkout during development:

python -m pip install -e .

After version 1.0.0 is published to your package index, consumers can use dgc-core==1.0.0 in their requirements.

Imports

from dgc_core import ApprovalStatus, GradingType, LogLevel, MongoCache, log, require_env
from dgc_core.pub import publish_message
from dgc_core.enums.card import CardCategory

Utilities, enums, and constants are exported together from dgc_core. Utility modules live directly in the package, alongside enums/ and constants/. Helpers cover authentication, configuration, HTTP fetching, logging, merging, MongoDB cache, normalization, PriceCharting parsing, Pub/Sub, regex, and Cloud Tasks. Domain definitions cover cards, users, submissions, and grading eligibility.

Migrating existing consumers

Replace the opticedge-cloud-utils and opticedge-types requirements with the single dgc-core requirement after publication, and update imports to dgc_core:

python -m pip install dgc-core==1.0.0
Previous import New import
from opticedge_cloud_utils import log from dgc_core import log
from opticedge_types import GradingType from dgc_core import GradingType
from opticedge_cloud_utils.pub import publish_message from dgc_core.pub import publish_message
from opticedge_types.enums.card import GradingType from dgc_core.enums.card import GradingType
from opticedge_types.constants.card import ON_DEMAND_ELIGIBLE_GRADING_TYPES from dgc_core.constants.card import ON_DEMAND_ELIGIBLE_GRADING_TYPES

Update mock and patch paths in consumer tests using the same mapping. The distribution provides only the dgc_core package.

Service requirements are not changed by this repository merge. Services pinned to older releases should run their own tests when adopting the combined release.

Development and verification

make test
make check

Without Make, create a virtual environment and activate it, then run:

python -m pip install -r requirements-dev.txt
python -m pytest --cov=dgc_core --cov-report=term-missing
python -m build
python -m twine check dist/*

The tests mock external calls. make build clears old build/ and dist/ output and produces a wheel and source distribution for the current version.

Releasing

make bump-patch
make publish

make bump-patch increments [project].version in pyproject.toml (for example, 1.0.0 to 1.0.1) and preserves the rest of the file's formatting. It uses the base Python interpreter and works before creating the virtual environment.

make publish builds fresh artifacts, checks them with Twine, and uploads them to your configured package index (PyPI by default), using your existing Twine credentials or configuration. Publishing uses the current version; it does not bump the version automatically.

Metadata

Release files for dgc-core 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dgc-core 1.0.0
File Size Uploaded Provenance Actions
dgc_core-1.0.0.tar.gz 35.1 kB Without provenance Details for dgc_core-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dgc-core 1.0.0
File Interpreter ABI Platform Actions
dgc_core-1.0.0-py3-none-any.whl Python 3 none any Details for dgc_core-1.0.0-py3-none-any.whl

Total release size: 52.3 kB

Release files / dgc_core-1.0.0.tar.gz

Download URL dgc_core-1.0.0.tar.gz
Size 35.1 kB
Tags Source
SHA-256 checksum
How to use checksums
93c4376390e4727f6bbed7c2ccc4eea984f6ab112bfbf8f59c0aaecc056b305b
BLAKE2b-256 checksum
How to use checksums
83d7178dfa344ae78147878a53ace7a2a316046cbec0816433491a90a670c8a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / dgc_core-1.0.0-py3-none-any.whl

Download URL dgc_core-1.0.0-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d77c29bab0a11b9a563d84d6251462dc44b67017dc55d44b0030370b44cee263
BLAKE2b-256 checksum
How to use checksums
dad85fc462a2b9727dfda1fc9e4890ba17b7a77da0b0121fa55099838b295273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for dgc-core 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page