Skip to main content

tagmanager

A Python library for tagging files.

Author: Grant Savage

Installation

pip install tagmanager

Current Package Limitations

This package currently works on Mac OS X 10.9 and newer. It was developed on Mac OS X 12.2 There is currently no functionality for Linux or Windows.

Package Structure

tagmanager
|   README.md
|   LICENSE
|   .gitignore
|   poetry.lock
|   pyproject.toml
|───tagmanager
|   |   __init__.py
|   |   tagmanager.py
|───tests
|   |   test_tagmanager_macOS.py
|───docs
|   |   Functional_Specs.md
|   |   Design_Specs.md
|───sample_folder
|   |   sample_file.txt

Tutorial

Add tag to file:

from tagmanager import tag_manager as tm

>> > file_location = "sample_folder/sample_file.txt"

# Add tag via Tag object
>> > tag = tm.Tag(name="green_tag", color="green")

>> > tm.add_tag(tag, file_location)

# Add tag via string
>> > tm.add_tag("blue_tag\nblue", file_location)

# Add colorless tag via string
>> > tm.add_tag("no_color_tag", file_location)

# Add tag via tuple
>> > tm.add_tag(("purple_tag", 'purple'), file_location)

# Add multiple tags via list of tuples
>> > red_list = [('first_red', 'red'), ('second_red', 'red')]

>> > tm.add_tag(red_list, file_location)

Return tags by file:

>>> tm.get_tags(file_location)
[Tag("blue_tag", "BLUE"), Tag("green_tag", "GREEN"), Tag("no_color_tag", "NONE"), Tag("purple_tag", "PURPLE"), Tag("first_red", "RED"), Tag("second_red", "RED")]

Remove tags from file:

# Remove tag via Tag object
>>> blue_tag = tm.Tag("blue_tag", "blue")

>>> tm.remove_tag(blue_tag, file_location)

# Remove tag via string
>>> tm.remove_tag("green_tag\ngreen", file_location)

# Remove colorless tag via string
>>> tm.remove_tag("no_color_tag", file_location)

# Remove tag via tuple
>>> tm.remove_tag(("purple_tag", "purple"), file_location)

# Remove multiple tags via list of tuples
>>> red_list = [('first_red', 'red'), ('second_red', 'red')]

>>> tm.remove_tag(red_list, file_location)

# Adding one tag back to show tags were removed
>>> tm.add_tag("new_tag", file_location)

>>> tm.get_tags(file_location)
[Tag("new_tag", "NONE")]

Metadata

Release files for tagmanager 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tagmanager 1.0.0
File Size Uploaded Provenance Actions
tagmanager-1.0.0.tar.gz 5.7 kB Without provenance Details for tagmanager-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tagmanager 1.0.0
File Interpreter ABI Platform Actions
tagmanager-1.0.0-py3-none-any.whl Python 3 none any Details for tagmanager-1.0.0-py3-none-any.whl

Total release size: 11.5 kB

Release files / tagmanager-1.0.0.tar.gz

Download URL tagmanager-1.0.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7e7dabbfa95719f29f64dff0858b858980143d353f9cb6c01e92a58d7a793402
BLAKE2b-256 checksum
How to use checksums
099330e84c4a1a978ea7013b890506f35c0431158481dced051d26d7f383108d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.11 Darwin/21.4.0

Release files / tagmanager-1.0.0-py3-none-any.whl

Download URL tagmanager-1.0.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad9fc9a9af38fca68c7fe5fbe5743af8f0860e5b4a86e6d49f4023f2987fb56e
BLAKE2b-256 checksum
How to use checksums
d67edead40cbaab0c5fc7e2d4334b807efcedc20223f8920894c983ad5b7cd88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.11 Darwin/21.4.0

Security for tagmanager 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page