New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

typecode

Package Overview
Dependencies
Maintainers
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typecode

Comprehensive filetype and mimetype detection using libmagic and Pygments.

  • 30.0.2
  • PyPI
  • Socket score

Maintainers
4

======== TypeCode

  • 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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc