Skip to main content

Cosmopolitan builds of file(1), distributed as a Python package

Project description

cosmo-file

Cross-platform file(1) command built with Cosmopolitan libc, distributed as a Python package.

Installation

pip install cosmo-file

Usage

Command Line

cosmo-file document.pdf
cosmo-file --version
echo "#!/bin/bash" | cosmo-file -

Python API

import cosmo_file

result = cosmo_file.run('image.png')
print(result.stdout.decode())

Features

  • Single universal binary runs on Windows, macOS, and Linux
  • No external dependencies
  • Python 3.8+ compatible
  • Supports all file command options

Platforms

  • Windows x64
  • macOS x86_64 / ARM64
  • Linux x86_64 / ARM64

Building from Source

Requires cosmocc:

./scripts/build_file_com.sh
pip install -e .

License

MIT (Python packaging) - See LICENSE

The bundled file utility is from file/file - See COPYING

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cosmo_file-5.46.1-py3-none-manylinux_2_17_aarch64.whl (1.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

cosmo_file-5.46.1-py3-none-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

cosmo_file-5.46.1-py3-none-macosx_10_9_x86_64.whl (1.2 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file cosmo_file-5.46.1-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for cosmo_file-5.46.1-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 ceda2462b1285e8fe923d6b58f7a3e17aae9533125fcdc0242fa11a929956074
MD5 7b00991b986720da40a8f255103fd9c5
BLAKE2b-256 9d7037a5fca5e396c19c5b93bf291793d18f9422438a0f6fb6b3ab36c5a43bd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmo_file-5.46.1-py3-none-manylinux_2_17_aarch64.whl:

Publisher: publish.yml on bjia56/cosmo-file

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmo_file-5.46.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmo_file-5.46.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b9bc3a30b6f9187348daa55de50cd1fe09c7ba2ee2de17f674405677cd7be968
MD5 f6cfccaf2f1d0fa555234a3ddf928aba
BLAKE2b-256 1e013df07fb281e1f53bedb8579a6b4bae95f8e3ce116a12c3e0f5eec7593500

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmo_file-5.46.1-py3-none-macosx_11_0_arm64.whl:

Publisher: publish.yml on bjia56/cosmo-file

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosmo_file-5.46.1-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cosmo_file-5.46.1-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1d70045646428f081bdc6ccac4259b2ff1c532194a1bdf53fd0d41d8e77b8cf5
MD5 923edd5cc0168e096395b95e51ad9022
BLAKE2b-256 b8eecbe414e55c7d782e3f0cddaed429b0f790b6b05c6fd04510a5f7fdf1887a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmo_file-5.46.1-py3-none-macosx_10_9_x86_64.whl:

Publisher: publish.yml on bjia56/cosmo-file

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