Skip to main content

Utility for checking whether a path is ignored by ignore files like .gitignore

Project description

isignored

Utility for checking whether a path is ignored by ignore files like .gitignore.

Installation

pip install isignored

Usage

from isignored import is_ignored

# Check if a file is ignored by .gitignore
is_ignored("path/to/file.log")  # True if ignored

# Check against multiple ignore files
is_ignored("path/to/file", [".gitignore", ".dockerignore"])

# Check with no ignore files
is_ignored("path/to/file", [])  # Always False

Features

  • Simple API with one main function
  • Supports .gitignore syntax (subset)
  • Works with any ignore file format
  • Handles nested ignore files
  • Caches ignore file contents for performance

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isignored-0.1.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isignored-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file isignored-0.1.0.tar.gz.

File metadata

  • Download URL: isignored-0.1.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for isignored-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e341daf3c7aa29cefa0540ff77c1fe1de6cebc05c86c17648a47a56287347ec7
MD5 b63ed27b71667c86658f556278b593e3
BLAKE2b-256 e85f11874a14ab6d2fa63def9dc84b98a91289b672f0a238fd22c60615158a51

See more details on using hashes here.

Provenance

The following attestation bundles were made for isignored-0.1.0.tar.gz:

Publisher: publish.yml on nielsrolf/isignored

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file isignored-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: isignored-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for isignored-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca92b2f2bd32e57967727a4c5f09051cf4dda9c390e483bb268f9503bf8c11fb
MD5 1d34784e4a4206b945c49dd10bc93496
BLAKE2b-256 394b56f18ced54faad29fec02d6bc7c535bce52dc9a60071a88446abd033109c

See more details on using hashes here.

Provenance

The following attestation bundles were made for isignored-0.1.0-py3-none-any.whl:

Publisher: publish.yml on nielsrolf/isignored

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