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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

cosmo_file-5.46.5-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.5-py3-none-win_amd64.whl.

File metadata

  • Download URL: cosmo_file-5.46.5-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.5-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1ef026b162acdc7b9c222f164572063cffbc78ac5af58de87c8b37296995cf8c
MD5 c96ee3181a2ac459c2ec59f38b4841fc
BLAKE2b-256 5bcca27d8719bbae19c7c4b411cfb01cfc12d2a4715abe8d514c30fe3f743fba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.5-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 22c938e1afd9a47fbe27ef7671d8bf2cb58ae19cd941adff675ac20f9418df22
MD5 86a82529d155a2832efa1a2bd22d3b8d
BLAKE2b-256 004a116acd095915bfb61b05f4c35cab42d719b7a5ce1558b598995ad2617e63

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.5-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 649a73cb55abb101947f7437cd59fc3ae9823fb53615c7bad6d3db6c287d9966
MD5 ffd3544c581950db67fed52b3f7836e5
BLAKE2b-256 491febd39930c04651b20fb8396f139a59207072678d3fede8f968e339dc1d95

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.5-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 461d77065d491696f5ac028d7a0b75a4a10ea54547d399464c14157645311823
MD5 f4a0463053158bf2dd891d524c4cdad6
BLAKE2b-256 9678f39381ec089bc9174fc0706113d73c0952ca6dc63482aceae208551434bd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.5-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fdfda0836b18115280a7783a92bc9bd5c0a6f7dac2e3f690a1ee381284fd02a2
MD5 f43309711495fdb8deb83bae5072b3a1
BLAKE2b-256 91b93b6c386db20ce6b555999de371b57f11d4664fc8e9f4a7331e8fc841064b

See more details on using hashes here.

Provenance

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