Registry / devops / ignore

ignore

JSON →
library0.1.4pypypiunverified

The Python `ignore` library (pypi-slug `ignore`) is a utility that fetches `.gitignore` file templates for various languages and operating systems directly from the official `github/gitignore` repository. It offers both a simple command-line interface and a programmatic API for integrating .gitignore file retrieval into Python projects. The latest version is 0.1.4, released in 2017, indicating it is in maintenance mode with infrequent updates.

pip install ignore
INSTALL
IMPORT
SIG · IGNORE
I
ignore
devopspythonv0.1.4
Install
2.4s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Ignore
import ignore
from ignore import Ignore

This quickstart demonstrates how to programmatically fetch a .gitignore file for a specific language (e.g., 'python') or multiple languages using the `Ignore` class, and print its content. It also illustrates how to handle cases where fetching might fail. Alternatively, use the CLI: `ignore python`.

import os from ignore import Ignore # Initialize the Ignore client client = Ignore() # Fetch the .gitignore content for Python python_gitignore = client.fetch('python') if python_gitignore: print("--- .gitignore for Python ---") print(python_gitignore) # Example: Save to a file # with open('.gitignore', 'w') as f: # f.write(python_gitignore) else: print("Could not fetch .gitignore for Python. Check language name or network connection.") # You can also fetch multiple languages (e.g., 'java' and 'node') # Combined content is returned as a single string java_and_node_gitignore = client.fetch(['java', 'node']) if java_and_node_gitignore: print("\n--- .gitignore for Java and Node ---") print(java_and_node_gitignore)
ignore --version
Debug
Known issues
deprecatedThe `ignore` library has not been updated since its 0.1.4 release in 2017. While functional for its intended purpose, it is not actively maintained. Users should be aware that new features, bug fixes, or compatibility updates for newer Python versions or changes to its dependencies are unlikely.
fix
Consider checking the GitHub repository (jarodl/ignore) for any community forks or alternative actively maintained tools if long-term support or new features are critical. For basic functionality, it should still work.
affects: <=0.1.4
gotchaThe library relies on the current structure and availability of `.gitignore` templates from the `github/gitignore` repository. If the upstream repository changes its file paths, naming conventions, or API, the library's fetching mechanism may break or return incorrect results.
fix
Monitor the `github/gitignore` repository for significant changes. If fetching breaks, you might need to manually update the library's internal logic (if forked) or find an alternative tool. Errors during `client.fetch()` would typically manifest as `None` being returned or a `requests.exceptions.HTTPError`.
affects: <=0.1.4
Upgrade
Version history
0.1.4latest on PyPI · released Nov 29, 2011
Audit
Dependencies
requestsrequiredUsed for making HTTP requests to fetch .gitignore files from GitHub.
clickrequiredUsed for building the command-line interface (CLI) for the `ignore` tool.
Agent activity
14 hits · last 30 days
node
14
Resources
ignore — pip install ignore · libregistry