No project description provided
Project description
Try bring C# linq to python 馃巿.
The library is a demo, not for production (yet).
Compare with Others
Different between lquery and others (linq for python like asq):
lquery try convert func (from bytecode) to SQL and query from database process.
Compare with CSharp
For C#:
IQueryable<?> query = null;
var items = query.Where(z => z.Name == 's').Select(z => z.Value).ToList();
So for python:
query: Queryable = None;
expr = query.where(z => z.name == 's').select(z => z.value).to_list();
for in-memory iterable
from lquery import enumerable
query: Queryable = enumerable([1, 2, 3])
# then query it
for mongodb
from lquery.extras.mongodb import MongoDbQuery
collection = # get a collection from pymongo
query: Queryable = MongoDbQuery(collection)
# then query it
linq APIs
to_memory - same as AsEnumerable() from C#
where
select
select_many
take
skip
read more examples from unittests.
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
lquery-0.1.0.tar.gz
(7.8 kB
view hashes)
Built Distribution
lquery-0.1.0-py3.6.egg
(26.7 kB
view hashes)