Linq for python
Project description
Linq for Python
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
Linqobject ( which contains your list )
selectselect_manyenum_selecttolisttodictgroupbywherefirstfirst_or_defaultanyallorderbyorderby_descmaxminsumaveragedistinctsinglesingle_or_defaultaddreverseremoveremove_alltake(new)skip(new)
Don't worry will add more methods.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3c9843136d2620b4aa625146b04d2224b2f1bbf9247ae985668c6f2e5de9f49
|
|
| MD5 |
cc44fe2a8932794c0c643c88b8e0e2fa
|
|
| BLAKE2b-256 |
35f306316aed06ccb93de9433b2f04ee5c2275fa4efd88b8c2759ad391d13d9a
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f86c8772301f70843fb1a760ed35fa2719a41eaffb4bbffcc34607eb34e8522f
|
|
| MD5 |
7a332889b01e71d46457de07d00ecfb0
|
|
| BLAKE2b-256 |
627dfe2a842e52a0df72f2f75d558da0f9e4587e931e15e9e2d92179fd44b8c9
|