Skip to main content

Comprehensive filetype and mimetype detection using libmagic and Pygments.

Project description

  • license: Apache-2.0

  • copyright: copyright (c) nexB. Inc. and others

  • homepage_url: https://github.com/nexB/typecode

  • keywords: filetype, mimetype, libmagic, scancode-toolkit, typecode

TypeCode provides comprehensive filetype and mimetype detection using multiple detectors including libmagic (included as a dependency for Linux, Windows and macOS) and Pygments. It started as library in scancode-toolkit. Visit https://aboutcode.org and https://github.com/nexB/ for support and download.

We run CI tests on:

To install this package with its full capability (where the binaries for libmagic are installed), use the full option:

pip install typecode[full]

If you want to use the version of libmagic (possibly) provided by your operating system, use the minimal option:

pip install typecode

In this case, you will need to provide a working libmagic and its database available in one of these ways:

The supported libmagic version is 5.39.

To set up the development environment:

source configure --dev

To run unit tests:

pytest -vvs -n 2

To clean up development environment:

./configure --clean

To update Pygment to a newer vendored version use vendy:

  • Update the version of pygments in pyproject.toml

  • Run vendy

  • Update the src/typecpde/pygments_lexers_mapping.py and src/typecode/pygments_lexers.py scripts accordingly, including their ABOUT files

Project details


Download files

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

Source Distribution

typecode-30.2.0.tar.gz (949.1 kB view details)

Uploaded Source

Built Distribution

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

typecode-30.2.0-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file typecode-30.2.0.tar.gz.

File metadata

  • Download URL: typecode-30.2.0.tar.gz
  • Upload date:
  • Size: 949.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for typecode-30.2.0.tar.gz
Algorithm Hash digest
SHA256 42b9477d7d05ba5668768dae46c2d2700d503b6e3791d2cd8003b5d10d0ea330
MD5 e26ea3ec908c08d8ac780eb3588990ed
BLAKE2b-256 af40ab6f2871f78ddaff5bdd3f0baf3abbdbbce262425c4e4836a672bbffadc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for typecode-30.2.0.tar.gz:

Publisher: pypi-release.yml on aboutcode-org/typecode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file typecode-30.2.0-py3-none-any.whl.

File metadata

  • Download URL: typecode-30.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for typecode-30.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e59d65ea899b30926f66c32f43d811aa200e8ce1aa84f95b109cdabb4af2acd
MD5 454c0de238bb53d3a241ade5795e8d15
BLAKE2b-256 c8e7597a7a5701ec77c20ad878d353781bc711fd343eee36d180252d0fbf87ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for typecode-30.2.0-py3-none-any.whl:

Publisher: pypi-release.yml on aboutcode-org/typecode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page