
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
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:
a typecode-libmagic plugin: See the standard ones at
https://github.com/nexB/scancode-plugins/tree/main/builtins
These can either bundle a libmagic library and its magic database or expose a
system-installed libmagic.
They do so by providing a plugin entry point as a scancode_location_provider
for typecode_libmagic
which points to a callable that must return a mapping
with these two keys:
See for example:
environment variables:
a system-installed libmagic and its database availale in the system PATH:
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:
pyproject.toml
vendy
FAQs
Comprehensive filetype and mimetype detection using libmagic and Pygments.
We found that typecode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.