Skip to main content
  • 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

Release files for typecode 30.2.0

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

Source distribution (sdist)

Source distribution for typecode 30.2.0
File Size Uploaded
typecode-30.2.0.tar.gz 949.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for typecode 30.2.0
File Interpreter ABI Platform
typecode-30.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / typecode-30.2.0.tar.gz

Download URL typecode-30.2.0.tar.gz
Size 949.1 kB
Tags Source
SHA-256 checksum
How to use checksums
42b9477d7d05ba5668768dae46c2d2700d503b6e3791d2cd8003b5d10d0ea330
BLAKE2b-256 checksum
How to use checksums
af40ab6f2871f78ddaff5bdd3f0baf3abbdbbce262425c4e4836a672bbffadc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.

Transparency log

Release files / typecode-30.2.0-py3-none-any.whl

Download URL typecode-30.2.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5e59d65ea899b30926f66c32f43d811aa200e8ce1aa84f95b109cdabb4af2acd
BLAKE2b-256 checksum
How to use checksums
c8e7597a7a5701ec77c20ad878d353781bc711fd343eee36d180252d0fbf87ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

30.2.0 This release

2 release files

30.0.1

2 release files

20.10

2 release files

20.9

2 release 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