Skip to main content

for C#er, you can write code like LINQ.

Project description

GitHub GitHub release (latest by date) GitHub tag (latest by date)

pylinqext

pylinqext is a package for C#er to write code like LINQ.

Usage

from pylinqext import pylist
from pylinqext import enumerable
  
e = enumerable([1,2,3,4,5,6,7,8,9,0])
  
e.where(lambda x: x % 2 == 0)\
        .select(lambda x: x * x)\
        .where(lambda x: 30 < x)\
        .to_pylist()\
        .for_each(lambda x: print(x))

Output:

36
64

Install

pip install git+https://github.com/super-string/pylinqext

Version

  • v0.0.1-alpha
    • first commit
  • v0.0.2
    • implement single, aggregate, etc
  • v0.0.3
    • readonlylist, some methods
  • v0.5.0
    • renampe project to pylinqext

class

  • enumerable
  • pylist
  • pydict
  • pyreadonlylist

Support

〇:implemented
△:not implemented
×:not suppot

Support Method Memo
aggregate
all
any
append
as_enumerable implemented to pylist
average
× cast
chunk
concat
contains
count
× default_if_empty
distinct
distinct_by
element_at
element_at_or_default
× empty
except named:set_difference
except_by named:set_difference_by
first
first_or_default
× group_by
× group_join
intersect
intersect_by
max
max_by
min
min_by
of_type
× order
× order_by
× order_by_descending
× order_descending
prepend
range
repeat
reverse
select
select_many
× sequential_equal
single
single_or_default
skip
skip_last
skip_while
sum
take
take_last
take_while
× then_by
× then_by_descending
× to_array
to_dict
to_set
to_list use to_pylist to write method chain.
× to_lookup
to_readonly_list
union
union_by
where
zip

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

pylinqext-0.5.0.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

pylinqext-0.5.0-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

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