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.4-py3-none-win_amd64.whl (1.2 MB view details)

Uploaded Python 3Windows x86-64

cosmo_file-5.46.4-py3-none-manylinux_2_17_x86_64.whl (1.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

cosmo_file-5.46.4-py3-none-manylinux_2_17_aarch64.whl (1.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

cosmo_file-5.46.4-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.4-py3-none-win_amd64.whl.

File metadata

  • Download URL: cosmo_file-5.46.4-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cosmo_file-5.46.4-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 cc407cc89129c67705ab2a430c94170f1dbb98cec53660a420f036b9f5625204
MD5 878bd3465db879e2b6cf80e7dda64df1
BLAKE2b-256 4b0f48536f95dbb4cbf3bcfc45f47ccb39e7cce28927270dfa18ed601386506c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmo_file-5.46.4-py3-none-win_amd64.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.4-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for cosmo_file-5.46.4-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 81c65fcc2a3a048dc96c65a5e9d594e8355df669c27c4a92a2d0601d4e98732f
MD5 7a904d46019042ef8d9b7612da6990ae
BLAKE2b-256 a784ff70eec44b38aff7a2e3dde1338f7c5b51475e3db1f8de41469e72b7652a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmo_file-5.46.4-py3-none-manylinux_2_17_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.

File details

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

File metadata

File hashes

Hashes for cosmo_file-5.46.4-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 1716092900d9a95fca3eec691940c857804782f3a2d37e2d5ae35927c580d746
MD5 c9c41534b8baf37a582a0cecd65b4345
BLAKE2b-256 7ad2fdfcb961733572de83ac1ff3ca94405e8f236be8865a0079b9a0daa34abe

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmo_file-5.46.4-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.4-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosmo_file-5.46.4-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d55175a297df857561b77c9da5f239a3a0c1af5ab3f16c0fd9c8afc5b737a89e
MD5 6bc835144141c22813df05b8274e487b
BLAKE2b-256 19160fdfe2610b858393e5edb522b1f560436e0a22f4076d96298c550ec24cd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmo_file-5.46.4-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.4-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for cosmo_file-5.46.4-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 de8442b91ef1434d96cb3bc3d17fc3ff29c818559668f95aefcd235c7fa69f6a
MD5 6858be1d097062d0ffca5251e979227a
BLAKE2b-256 74676a32c0a60cc96f0c9c74203aafbbac3c891691be439bed58ac7b4f421f61

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmo_file-5.46.4-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