Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Music Metadata - Territories

Build Status Coverage Status GitHub PyPI

A very simple library for dealing with territory hierarchies used in music metadata, currently primarily focused on CISAC TIS.

It loads the territories and hierarchies from CSV files, made from Excel files downloaded from CISAC documents.

One of the most importaint features is that it turns any combination of includes and excludes into a include-only list.

It has only two classes:

  • Territory - the territory, e.g. World, Europe, Croatia
  • TerritoryList - this class makes including and excluding territories simpler, it also splits territories down when needed, e.g. World excluding Croatia results in a minimal list of included territories, and not all the countries:
from music_metadata.territories import *

world = Territory.get('2136')
usa = Territory.get('US')

l = TerritoryList()
l.include(world)
l.exclude(usa)

for t in sorted(l, key=lambda x: x.name):
    print(f'{t.tis_n:0>4}', t.name)

Result:

2100 AFRICA
2106 ASIA
0124 CANADA
2113 CENTRAL AMERICA
2120 EUROPE
0484 MEXICO
2130 OCEANIA
2132 SOUTH AMERICA
2134 WEST INDIES

Metadata

Release files for music-metadata-territories 19rc1

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

Source distribution (sdist)

Source distribution for music-metadata-territories 19rc1
File Size Uploaded Provenance
music_metadata_territories-19rc1.tar.gz 19.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for music-metadata-territories 19rc1
File Interpreter ABI Platform
music_metadata_territories-19rc1-py3-none-any.whl Python 3 none any Details

Total release size: 42.1 kB

Release files / music_metadata_territories-19rc1.tar.gz

Download URL music_metadata_territories-19rc1.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6e401e1a6b5e3a241fc82fd7c97be64ca625374d0fcb327afdaa684a0444b9db
BLAKE2b-256 checksum
How to use checksums
4f0c6530c260c58de9dbc3e1a935d0ec6f2bb1597d7f61732d43c46e730d069c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8

Release files / music_metadata_territories-19rc1-py3-none-any.whl

Download URL music_metadata_territories-19rc1-py3-none-any.whl
Size 22.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b26ad872d97bbf6254cda2817bb8adaa990c6c98126bcb38e46ef154f563de75
BLAKE2b-256 checksum
How to use checksums
5786c501a5ef4c836489057db0251dbf4f66b1250013e442952acb56d57a09ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8

Security for music-metadata-territories 19rc1

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