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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

cosmo_file-5.46.6-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.6-py3-none-win_amd64.whl.

File metadata

  • Download URL: cosmo_file-5.46.6-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.13

File hashes

Hashes for cosmo_file-5.46.6-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f4fc7dbbf3d152c7695cb1f3041d44779938637d9c86d99c75e67a663043e35e
MD5 fd181adffbaf11f0e63f96e796548852
BLAKE2b-256 28fa0c9f90fd9869f68374fe8770293b890502c5a73c4816d3438adeecc41933

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.6-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 b5950947c9e036cd0511d569fd6ae66341cd329e75b9bda6c094cb1b30fa20e5
MD5 7db5c4c2db3398f2d483fcd8aae91931
BLAKE2b-256 432d9f66ff96289e8ef013e3f073b378e16a950e7048c548c281690cfcccf8c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.6-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 ef696239c7912ffdc9b0fb60ae2ed97d2596ccab41f504480daead2421ea65e2
MD5 46a811f571c09971849b00335f82f754
BLAKE2b-256 21610fac22cac91d91548eb7a167a8491015e5529c3c561141416dfb216abb74

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.6-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8184c05b738da7de9af5a8a3aa84fa7a189b33464cda0663fbaa6991f5784c1a
MD5 a7808637238370f2c25f84ba38013014
BLAKE2b-256 08a6a1508a930256988ec4544aeb7a6f94780d03ec22c233f587a71271512c2f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.6-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0f73e933d121e83f30bad8536dc634e3985ab4ef2e61a47062a221216051395f
MD5 c3f01064955523c3b7e3b16e56033853
BLAKE2b-256 5b45dc835bd5dc0c03677eeeeb65ebad81d07eba6585a285882ab893ee10a9d3

See more details on using hashes here.

Provenance

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