Skip to main content

Sets

Set operations over files where each line is an element.

pip3 install -U sets-operation-over-files

$ sets 'set_a | set_b' -s
a
b
c
d
e
f
g
h
i
j

Usage

An expression supports | (union), & (intersection), - (difference), ^ (symmetric difference), and/or, and parentheses:

$ sets 'set_a & set_b'

File names can be quoted to allow spaces and special characters: sets "'my list.txt' | other". Output keeps the left operand's line order; -s sorts it.

How it works

The expression is parsed into an AST instead of string-replaced. Identifiers and quoted strings are rewritten to file reads — set_a & set_b becomes s('set_a') & s('set_b') — then evaluated with only the s function exposed and builtins disabled.

A whitelist guard rejects any node outside set-expression syntax (Attribute, Lambda, Subscript, ...), so the expression cannot run arbitrary code. Files are read into an order-preserving set (OrderedSet), so results keep the left operand's line order across runs.

Metadata

Release files for sets-operation-over-files 0.1.3

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

Source distribution (sdist)

Source distribution for sets-operation-over-files 0.1.3
File Size Uploaded Provenance
sets_operation_over_files-0.1.3.tar.gz 3.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sets-operation-over-files 0.1.3
File Interpreter ABI Platform
sets_operation_over_files-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / sets_operation_over_files-0.1.3.tar.gz

Download URL sets_operation_over_files-0.1.3.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e6875af4b9fc058b28a5fbeaabe6162fc0cab8b714709b9d9bc589ea8c6dcf24
BLAKE2b-256 checksum
How to use checksums
05987f91a2e5638f6277dc287e8005924b5867b134bc625fd54eb53a40483664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / sets_operation_over_files-0.1.3-py3-none-any.whl

Download URL sets_operation_over_files-0.1.3-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
744ec01693666e6cf0f692d2cc48237ae8198623e8a5a04f44d50263c6460094
BLAKE2b-256 checksum
How to use checksums
3f3c1883f9655a70aac522c1902742636c8bf08458eca306a7d77521eff0e19c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for sets-operation-over-files 0.1.3

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.

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