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

Uploaded Python 3Windows x86-64

cosmo_file-5.46.2-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.2-py3-none-manylinux_2_17_aarch64.whl (1.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

cosmo_file-5.46.2-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.2-py3-none-win_amd64.whl.

File metadata

  • Download URL: cosmo_file-5.46.2-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.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 9524ddb176557dbd5d0febce217f1c08d1c5f0e924bece99e220877dd2ca8fbd
MD5 2f3ff0c777c32ba9e0e168532bdc6433
BLAKE2b-256 e3bf5ca7d78ebeb8050121621bc2be628ee76fac0463348b5dc75a56be9c6f06

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.2-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 01d78721e428b18c1ca9d823ba60627e1bbc27dfaa35756bdcd1e6e9d30c76aa
MD5 3caae719e53ea0d75da5c4ba756f9733
BLAKE2b-256 75f1ec90e7d8697f1689517834c9b2cd6340fc8839c611a00d12b73441feafd1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.2-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 2814e6dbc89845d43fb6f1a3be8539e3e916a264fe351191c1bea82c40421f47
MD5 2eb1c293dc294abce17204eaac11a3bc
BLAKE2b-256 ca66b3c77a3fb1e585788939b2b8f50d6e71a106212ae82c37d8841a0b9b4f3b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dfb2792de06432dcdec2da6fc5071325c156914705361a5dab946cddae7c7396
MD5 f75b4de6a3d920f22fd56b9ef4be3c11
BLAKE2b-256 2b583cb41b3d23bcef243bede611c80c834e4fa470bc203aaf317d1c03830207

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cosmo_file-5.46.2-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f9a6bca536ff79640594f748883de4c9de240ebefd31660b976922c2f780ea2f
MD5 fa9c0ad952987b5d4c0df2e5495df8da
BLAKE2b-256 7647633d71eba35816b1896d2228ed372026165d7c576e87aef75ea14e3c850a

See more details on using hashes here.

Provenance

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