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

Uploaded Python 3Windows x86-64

cosmo_file-5.46.3-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.3-py3-none-manylinux_2_17_aarch64.whl (1.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

cosmo_file-5.46.3-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.3-py3-none-win_amd64.whl.

File metadata

  • Download URL: cosmo_file-5.46.3-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.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 cafac82e8246aea4224f8dadb26068d690e0388d3c12d3d6c455d7bef8e30f20
MD5 b53343433346a650f818aa00b0e5d95c
BLAKE2b-256 c37271b01bcaa024186aba3375ab53ee9ad18f35cb12f0ea04aee055971b2ab5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.3-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 66de660b2b2548255037241c3674c5fbb2552924935eb676982a2cbd603ff44b
MD5 2beed1f4a6cc1da146d89095c6fdd88b
BLAKE2b-256 d7f615747ee19a9b69396dfc014be466745c80c669bc37bc32a724b3b459e31b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosmo_file-5.46.3-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.3-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for cosmo_file-5.46.3-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 e6b970ad3e24334e663de0c4bf89c4d7d61d1763de57f409b6b440d467ec0373
MD5 5f2a3be121188d8847be41247fe43c5c
BLAKE2b-256 674c44d97c05c1744219603f60b7d88231c680557940f036206265f985319a69

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bbe26214f36665c08611d12b29328eeafe91faa571b0a5744de902d6ae629ce0
MD5 1a84ee4b87e6b2b60e27de152c176fb9
BLAKE2b-256 f952a903e06bce7e51b7d1ab9f019cd608c90e0a09a3f5fa60e79a01c08a6920

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.3-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2b3b1ceba62ab0816d37ad96e2a0d2bcdff831866a730eca7e55af0bcea29d6c
MD5 251fe1ed89b0f22086b9d633eaeb7c7e
BLAKE2b-256 f9a2d160dcd082a9f77dc9b5ad9a1c04cfac0e81c8421346cecc37c220a24b76

See more details on using hashes here.

Provenance

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