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

Uploaded Python 3Windows x86-64

cosmo_file-5.46.0-py3-none-manylinux_2_17_x86_64.whl (1.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

cosmo_file-5.46.0-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.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: cosmo_file-5.46.0-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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 872a1a3eebdbd42308f40cdc562e3cef76e5bbffd4314fd4806c07225b73f91e
MD5 f2db583521f6586d5fbd5897857011e3
BLAKE2b-256 63ff51ac7419ced8719a08830cc49bcfdaec6d1697461df14128a3b993fbed61

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 b785313febc6fa8761bfd7d5c6c1df8b36e48eb5790a367b4c319be600309759
MD5 89b68722f631765043983997003dd0ce
BLAKE2b-256 c6740657c6971c8d0f005bba6a95e4cbc7b25b919876a32648033582a8d58d4e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 39d51d30b0274f7e6bcb3b386e20265831229d2fe066d7e79ac8cc131066241a
MD5 f87f55cb614aab08a817dabc049d600b
BLAKE2b-256 feda83e9471b7c125067cee6f8aed9ec8654a7e289b0d013361d72753b73d09a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1a4ed360304ecc87411440096938cdc46962881cb055b7d196226d5e23db9b18
MD5 dbcc29f25354f569385fd0317c845634
BLAKE2b-256 b9500bb30ca24c7dfe54f67f915df3d744af8a3f176556bcd99ee8774452fa72

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a90064295d4e612d2cdfa846e915d24f71ab1cf0bb20150d1ce25bd22c14291e
MD5 56cb2d66f98bed118ea249f4837949ca
BLAKE2b-256 37a06c0c7445b7f352ec6e17a55019828af137b65c85c57ff2df8f5aa1d890e9

See more details on using hashes here.

Provenance

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