Skip to main content

Digital Marketplace utils

Python 3.11 Python 3.12 Python 3.13 Python 3.14 PyPI version

What's in here?

  • Digital Marketplace API clients
  • Formatting utilities for Digital Marketplace
  • Digital Marketplace logging for Flask using JSON Logging
  • Utility functions/libraries for Amazon S3, Mailchimp, Notify, Cloudwatch
  • Helper code for Flask configuration
  • A formed version of Flask Feature Flags

Logging from applications

When logging from applications you should write your message as a format string and pass any required arguments to the log method in the extra named argument. This allows our logging to use them as separate fields in our JSON logs making it much easier to search and aggregate on them.

logger.info("the user {user_id} did the thing '{thing}'", extra={
    'user_id': user_id, 'thing': thing
})

Note that apart from not getting the benefit, passing the formatted message can be dangerous. User generated content may be passed, unescaped to the .format method.

Versioning

Releases of this project follow semantic versioning, ie

Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes,
  • MINOR version when you add functionality in a backwards-compatible manner, and
  • PATCH version when you make backwards-compatible bug fixes.

To make a new version:

  • update the version in the dmutils/__init__.py file
  • if you are making a major change, also update the change log;

When the pull request is merged a GitHub Action will tag the new version.

Pre-commit hooks

This project has a pre-commit hook to do some general file checks and check the pyproject.toml. Follow the Quick start to see how to set this up in your local checkout of this project.

Licence

Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation.

The documentation is © Crown copyright and available under the terms of the Open Government 3.0 licence.

Metadata

Release files for ccs-digitalmarketplace-utils 81.0.2

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

Source distribution (sdist)

Source distribution for ccs-digitalmarketplace-utils 81.0.2
File Size Uploaded Provenance Actions
ccs_digitalmarketplace_utils-81.0.2.tar.gz 85.1 kB Without provenance Details for ccs_digitalmarketplace_utils-81.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ccs-digitalmarketplace-utils 81.0.2
File Interpreter ABI Platform Actions
ccs_digitalmarketplace_utils-81.0.2-py3-none-any.whl Python 3 none any Details for ccs_digitalmarketplace_utils-81.0.2-py3-none-any.whl

Total release size: 188.8 kB

Release files / ccs_digitalmarketplace_utils-81.0.2.tar.gz

Download URL ccs_digitalmarketplace_utils-81.0.2.tar.gz
Size 85.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f3a8079e7420cb3a82b607a7b4a0ad3f350ec76613614670d53902385c6a8bbd
BLAKE2b-256 checksum
How to use checksums
7e99caeeab850bf2f2d07eed18c28a1dcb314341adce33f84a7c806dcaa4e0e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / ccs_digitalmarketplace_utils-81.0.2-py3-none-any.whl

Download URL ccs_digitalmarketplace_utils-81.0.2-py3-none-any.whl
Size 103.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c85d4f2dc1c622b9fe712355bcdab5278613cd8d44adfbb2418826665b39a11
BLAKE2b-256 checksum
How to use checksums
ec3f10b3dd896ac80f1a50432fcbca953e5c7f4bbe1650a25625e19cfdc38323
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Security for ccs-digitalmarketplace-utils 81.0.2

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.

Release history Release notifications | RSS feed

This release

81.0.2 This release

2 release files No provenance

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