Skip to main content

Linq for python

Project description

Linq for Python

Upload Python Package pypi-badge license-badge

Python application tests

What's that

Simple Language integrated query for Python

This package helps you write queries on Iterable objects in python

It makes it easy to deal with iterators.

Why should i use this?

Well you should not! i mean you don't need such thing at all. python has already fully implemented methods for iterables, but if you used to Linq in C# ( like me ), you are probably want to use such package.

How to?

Well it's super easy

Let's take a look at the examples

from ipyquery import Linq

my_list = Linq([5, 1, 7, 2, 3, 10, 1, 4, 5])

powered_cleaned = my_list.distinct().where(
    lambda x: x <= 5).orderby().select(lambda x: x**2).tolist()

print(powered_cleaned)

# [1, 4, 9, 16, 25]

You can use methods to do whatever you want with your list just that easy!

More Examples?

Take a look at tests folder ( There are a lot to explore )

Currently available methods

Below you can see all currently available methods, all of these can be used on Linq object ( which contains your list )

  • select
  • select_many
  • enum_select
  • tolist
  • todict
  • groupby
  • where
  • first
  • first_or_default
  • any
  • all
  • orderby
  • orderby_desc
  • max
  • min
  • sum
  • average
  • distinct
  • single
  • single_or_default
  • add
  • reverse
  • remove
  • remove_all
  • take (new)
  • skip (new)

Don't worry will add more methods.

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

ipyquery-0.0.6.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

ipyquery-0.0.6-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file ipyquery-0.0.6.tar.gz.

File metadata

  • Download URL: ipyquery-0.0.6.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for ipyquery-0.0.6.tar.gz
Algorithm Hash digest
SHA256 e3c9843136d2620b4aa625146b04d2224b2f1bbf9247ae985668c6f2e5de9f49
MD5 cc44fe2a8932794c0c643c88b8e0e2fa
BLAKE2b-256 35f306316aed06ccb93de9433b2f04ee5c2275fa4efd88b8c2759ad391d13d9a

See more details on using hashes here.

File details

Details for the file ipyquery-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: ipyquery-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for ipyquery-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f86c8772301f70843fb1a760ed35fa2719a41eaffb4bbffcc34607eb34e8522f
MD5 7a332889b01e71d46457de07d00ecfb0
BLAKE2b-256 627dfe2a842e52a0df72f2f75d558da0f9e4587e931e15e9e2d92179fd44b8c9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page