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.1.0.tar.gz (948.8 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.1.0-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for typecode-30.1.0.tar.gz
Algorithm Hash digest
SHA256 fca3617a43c307578656d70634c287c7da32aee3fdee87fbc9dcf1fbd3fb750f
MD5 0a7c4b18e9c9b50bcb3af85cef771b32
BLAKE2b-256 22f12237c586b0de7fdbe95905400b8d6e5d272bd07207c03eb68752f69576aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for typecode-30.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: typecode-30.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d61a9cc8dfb22712c15f83936564cc034429b81f66e24058b89ce5169af39b34
MD5 e8eb7d6a7a8af2722093f8ad1c410b46
BLAKE2b-256 668d14a4a06f19a959f28f502045bd0f20b25aee90a0eadef40690613d0e3c3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for typecode-30.1.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