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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccs_digitalmarketplace_utils-81.0.2.tar.gz (85.1 kB view details)

Uploaded Source

Built Distribution

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

ccs_digitalmarketplace_utils-81.0.2-py3-none-any.whl (103.7 kB view details)

Uploaded Python 3

File details

Details for the file ccs_digitalmarketplace_utils-81.0.2.tar.gz.

File metadata

File hashes

Hashes for ccs_digitalmarketplace_utils-81.0.2.tar.gz
Algorithm Hash digest
SHA256 f3a8079e7420cb3a82b607a7b4a0ad3f350ec76613614670d53902385c6a8bbd
MD5 fc7f8e8ea31200cb9b2f1336bf0df5ab
BLAKE2b-256 7e99caeeab850bf2f2d07eed18c28a1dcb314341adce33f84a7c806dcaa4e0e9

See more details on using hashes here.

File details

Details for the file ccs_digitalmarketplace_utils-81.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ccs_digitalmarketplace_utils-81.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8c85d4f2dc1c622b9fe712355bcdab5278613cd8d44adfbb2418826665b39a11
MD5 52556c8c6d179503662716a3e587fe7b
BLAKE2b-256 ec3f10b3dd896ac80f1a50432fcbca953e5c7f4bbe1650a25625e19cfdc38323

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

81.0.2 This release

2 files

81.0.1

2 files

81.0.0

2 files

80.2.0

2 files

80.1.0

2 files

80.0.0

2 files

79.14.0

2 files

79.13.0

2 files

79.12.0

2 files

79.11.0

2 files

79.10.0

2 files

79.9.0

2 files

79.8.0

2 files

79.7.0

2 files

79.6.1

2 files

79.6.0

2 files

79.5.0

2 files

79.4.0

2 files

79.3.0

2 files

79.2.1

2 files

79.2.0

2 files

79.1.1

2 files

79.1.0

2 files

79.0.0

2 files

78.2.0

2 files

78.1.0

2 files

78.0.0

2 files

77.0.0

2 files

76.8.0

2 files

76.7.0

2 files

76.6.0

2 files

76.5.0

2 files

76.4.0

2 files

76.3.1

2 files

76.3.0

2 files

76.2.0

2 files

76.1.0

2 files

76.0.0

2 files

75.5.0

2 files

75.4.0

2 files

75.3.0

2 files

75.2.0

2 files

75.1.0

2 files

75.0.0

2 files

74.2.0

2 files

74.1.0

2 files

74.0.0

2 files

73.0.1

2 files

73.0.0

2 files

72.5.0

2 files

72.4.1

2 files

72.4.0

2 files

72.3.0

2 files

72.2.1

2 files

72.2.0

2 files

72.1.0

2 files

72.0.0

2 files

71.0.0

2 files

70.1.0

2 files

70.0.1

2 files

70.0.0

2 files

69.0.1

2 files

69.0.0

2 files

68.1.0

2 files

68.0.0

2 files

67.3.0

2 files

67.2.0

2 files

67.1.0

2 files

67.0.0

2 files

66.3.0

2 files

66.2.0

2 files

66.1.0

2 files

66.0.1

2 files

66.0.0

2 files

65.12.0

2 files

65.11.0

2 files

65.10.0

2 files

65.9.0

2 files

65.8.0

2 files

65.7.0

2 files

65.6.1

2 files

65.6.0

2 files

65.5.0

2 files

65.4.0

2 files

65.3.1

2 files

65.2.0

2 files

65.1.0

2 files

65.0.1

2 files

65.0.0

2 files

64.1.0

2 files

64.0.0

2 files

63.3.0

2 files

63.2.0

2 files

63.1.0

2 files

63.0.0

2 files

62.4.0

2 files

62.3.2

2 files

62.3.1

2 files

62.3.0

2 files

62.2.0

2 files

62.1.0

2 files

62.0.0

2 files

61.7.0

2 files

61.6.1

2 files

61.6.0

2 files

61.5.0

2 files

61.4.0

2 files

61.3.0

2 files

61.2.1

2 files

61.2.0

2 files

61.1.0

2 files

61.0.0

2 files

60.5.0

2 files

60.4.0

2 files

60.3.0

2 files

60.2.1

2 files

60.2.0

2 files

60.1.1

1 file

60.1.0

1 file

60.0.5

1 file

60.0.4

2 files

60.0.3

1 file

60.0.2

2 files

60.0.1

2 files

60.0.0

2 files

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