Skip to main content

Comprehensive filetype and mimetype detection using libmagic and Pygments.

Reason this release was yanked:

Left debug tracing on by mistake

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-21.5.31.tar.gz (3.8 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: typecode-21.5.31.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.6

File hashes

Hashes for typecode-21.5.31.tar.gz
Algorithm Hash digest
SHA256 1693ca021bdd4adeae634068d8a114b77dfce2502f34dc9af4ca7c92c81d4b40
MD5 cb6e6405912e94d1b18de305506d996d
BLAKE2b-256 d5912efdf62fc1ed71213c7eb7596a2a392354291255561a6226e0856aaeea97

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: typecode-21.5.31-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.6

File hashes

Hashes for typecode-21.5.31-py3-none-any.whl
Algorithm Hash digest
SHA256 394c8d2ccea045ffa5a6ee3085d2d482d3e591a248d10e2df2e73bce84fe76bf
MD5 92b5903d0a95b863722b6ea71a165fce
BLAKE2b-256 9a77080087a4032c56a98ecd62b449c33b7907048b2183e4b5e5a0b637309cf1

See more details on using hashes here.

Provenance

Supported by

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