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.
Metadata
Release files for ipyquery 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ipyquery-0.0.6.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ipyquery-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / ipyquery-0.0.6.tar.gz
| Download URL | ipyquery-0.0.6.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3c9843136d2620b4aa625146b04d2224b2f1bbf9247ae985668c6f2e5de9f49
|
|
BLAKE2b-256 checksum How to use checksums |
35f306316aed06ccb93de9433b2f04ee5c2275fa4efd88b8c2759ad391d13d9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / ipyquery-0.0.6-py3-none-any.whl
| Download URL | ipyquery-0.0.6-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f86c8772301f70843fb1a760ed35fa2719a41eaffb4bbffcc34607eb34e8522f
|
|
BLAKE2b-256 checksum How to use checksums |
627dfe2a842e52a0df72f2f75d558da0f9e4587e931e15e9e2d92179fd44b8c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|