Skip to content

Commit

Permalink
Migrate to pdm for package management (#122)
Browse files Browse the repository at this point in the history
* Use PDM for packaging and distribution

* Only install test dependencies

* updated lock file

* updated config

* updated  changelog

* Added new line

* Fixed readme file and added long descripton to toml
  • Loading branch information
rubydog authored Oct 21, 2024
1 parent 712f3d5 commit 7273ad9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
18 changes: 2 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,6 @@ Alternatively, if you have an already fetched organization::

usage_periods = organization.periodic_usages().all()

Organization Periodic Usages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Retrieving all API Usage statistics for an Organization grouped by Space during a given usage period, broken down by organization for all APIs::

# Optionally, you can pass the metric, start and end date filters
usage = client.space_periodic_usages('organization_id').all()
# For example only CDA and CMA metrics from yesterday onwards
usage = client.space_periodic_usages('organization_id').all({'metric[in]': ['cda', 'cma'], 'startDate': (date.today() - timedelta(days=1)).isoformat()})

Alternatively, if you have an already fetched organization::

usage_periods = organization.space_periodic_usages().all()


Users
-----

Expand Down Expand Up @@ -537,6 +522,7 @@ Removing a tag from an asset::
Accessing tag of an entry or asset::

entry._metadata['tags'] or asset._metadata['tags'] # will return a list of tags

Content Types
-------------

Expand Down Expand Up @@ -1266,7 +1252,7 @@ To use the logger, use the standard library ``logging`` module::
License
-------

Copyright (c) 2017 Contentful GmbH. See `LICENSE <./LICENSE>`_ for further details.
Copyright (c) 2017 Contentful GmbH. See LICENSE for details.

Contributing
------------
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ build-backend = "pdm.backend"
[project]
name = "contentful_management"
description = "Contentful Management API Client"
long_description = "README.rst"
long_description_content_type = "text/x-rst"
dynamic = ["version"]
readme = "README.rst"
requires-python = ">=3.8"
Expand Down

0 comments on commit 7273ad9

Please sign in to comment.