Skip to main content

Versatile Python package that brings powerful, C#-like collection and query capabilities to your projects.

Project description

Collective

Collective is a versatile Python package that brings powerful, C#-like collection and query capabilities to your projects.

It includes two main classes:

  • Collection: a flexible container for your data, supporting operations like sorting, filtering, mapping, reducing, and more.
  • Queryable: a fluent querying engine built on top of Collection, enabling complex, SQL-like data transformations and retrievals.

Installation

pip install pz-collective

(Replace this with your actual installation command, e.g., if you’re hosting it on GitHub or PyPI)

Quick Example

from pz_collective import Collection, Queryable

# Create a collection
data = Collection(1, 2, 3, 4, 5)

# Use Collection methods
data.Add(6).Remove(3)
print(data.ToList())  # [1, 2, 4, 5, 6]

# Query with Queryable
result = Queryable(data).Where(lambda x: x % 2 == 0).Select(lambda x: x * 10).ToCollection()
print(result.ToList())  # [20, 40, 60]

Features

  • Add, remove, and manage items easily
  • LINQ-like querying with filtering, mapping, and sorting
  • Advanced data manipulations (reduce, zip, flatten, etc.)
  • Fluent, chainable interface

License

MIT License

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

pz_collective-0.0.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

pz_collective-0.0.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file pz_collective-0.0.1.tar.gz.

File metadata

  • Download URL: pz_collective-0.0.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for pz_collective-0.0.1.tar.gz
Algorithm Hash digest
SHA256 84206f7cc5930c46235ebf073a557806f2e81bcf96f553d24b0fa5d8caa19db3
MD5 163ff7e54bda2befe1746cd513d2b18a
BLAKE2b-256 67dad530bb66f4aa9b7ff36c4e49035df36db880730259dc234972f14a983912

See more details on using hashes here.

File details

Details for the file pz_collective-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pz_collective-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for pz_collective-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c55eb7112da5bbaed9934243308d9fa076b26d92950c0bb9cd3a74c83197ce4
MD5 411bbe3ed5f2b83788a21f9b8df8e9df
BLAKE2b-256 f18ebdf510b32ab193d94a4f681788527ae7b0a404193c375bad808f38e7bc49

See more details on using hashes here.

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