Skip to main content

Linq for Python

Project description

Python package

py-linq

LINQ (Language Integrated Query) is a popular querying language available in .NET. This library ports the language so that developers can query collections of objects using the same syntax. This library would be useful for Python developers with experience using the expressiveness and power of LINQ.

Install

Available as a package from PyPI.

pip install py-linq

Usage

To access the LINQ functions an iterable needs to be wrapped by the Enumerable

from py_linq import Enumerable
my_collection = Enumerable([1,2,3])

Documentation

Please visit the project site for better documentation

Contributing

Contributions are welcomed. This project uses pipenv to handle the few library dependencies. Pre-commit is also used so that formatting and linting checks are performed on commit.

  1. Clone the repository using git clone https://github.com/viralogic/py-enumerable.git
  2. Install pipenv globally pip install pipenv
  3. CD into the root of your cloned repository directory and pipenv install --dev to install all packages from the repository Pipfile.
  4. Install pre-commit by typing pipenv run pre-commit install
  5. You should now be ready to start coding!

Authors

Bruce Fenske

Contributors

  1. Oleg Shilo
  2. Sebastien Celles
  3. Daniel Goltz

History

Date Version Description
21-Apr-2020 1.2.2
  • Issue #38 - Fixed issue where to_list calls were taking a very long time. Added some regression testing for this issue
  • General performance improvements across code-base where identified
21-Jan-2020 1.2.1
  • Issue #36 - Fixed iterating over files
24-Nov-2019 1.2.0
  • Memory consumption improvements by removal of data caching when collection is iterated over
  • Issue #22 - Unexpected behaviour when using iterator as input data
  • Issue #34 - Data loss when using any function
  • Issue #35 - Unexpected result when using first function
7-Oct-2019 1.1.0
  • Issue #23 - Any accepts a None predicate
  • Issue #24 - Performance improvement where any returns on first matching element
  • Issue #25 - Use of any to check for elements in an Enumerable
  • Issue #26 - Performance improvement where element_at only iterates until the n-th element
  • Issue #29 - Performance improvement where distinct method is no longer immediately executing.
  • Issue #30 - Performance improvement where all function is no longer iterating through collection more than once
  • Issue #31 - Performance improvement where reverse function is no longer immediately executing
  • Issue #32 - Count function now accepts a lambda predicate to filter collection
16-Jul-2019 1.0.1
  • Issue #21 - Support lambda predicates in first, first_or_default, last, and last_or_default methods
07-Mar-2019 1.0
  • Issue #17 - Added additional LINQ methods to complete the Enumerable API as per MSDN
06-Jan-2019 0.7
  • Issue #19 - Distinct bug fix
06-Dec-2018 0.6
  • Issue #13 - Empty list as default parameter
  • Issue #14 - except_ method bug fix
19-Jul-2017 0.5
  • last and last_or_default method bug fixes
  • then_by and then_by_descending implementation
30-Jan-2017 0.4
  • Added Python 3 support
15-Jan-2015 0.3
  • Changed README.rst
  • Performance improvements
12-Jan-2015 0.2
  • Added documentation
07-Jan-2015 0.1
  • Initial beta release

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

py_linq-1.2.4.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

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

py_linq-1.2.4-py2.py3-none-any.whl (11.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file py_linq-1.2.4.tar.gz.

File metadata

  • Download URL: py_linq-1.2.4.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.23.0

File hashes

Hashes for py_linq-1.2.4.tar.gz
Algorithm Hash digest
SHA256 e29f45e11e78d30f9f86274631146e7a10bec4a3d0fa39e534de6f9f64b1549a
MD5 7211c497333d91b96b199feed4a6133f
BLAKE2b-256 d19d6ce1db087b41449393c6ba23ca87cb940a195d4f476efe2d254bc36068b9

See more details on using hashes here.

File details

Details for the file py_linq-1.2.4-py2.py3-none-any.whl.

File metadata

  • Download URL: py_linq-1.2.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.23.0

File hashes

Hashes for py_linq-1.2.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b77c9779e1b4d4d753397db2110fbf756cdc7e0076dd08a9f1ec53b8357c9dfa
MD5 2514984c92a5def3f44345f3cbd1e09e
BLAKE2b-256 cbadc7cba333c542cf195359166fadefa608332ba7e445e990da2d90ada35143

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