Skip to main content

Extensions methods for the list, inspired in linq csharp

Project description

linq_py_net

The linq_py_net package is used to manage list collections:

methods description
where filter itens by lambda predicate
count count itens, lambda predicate is optiona
first_or_default find first item on the sequence, predicate is optional
select project data from list

Installation

Use the package manager pip to install linq_py_net

pip install linq_py_net

Usage

from linq_py_net import List

linq = List([1,2,3,4,5,6,7,8,9,10])

linq.first_or_default() # 1

pares = linq.where(lambda x: x % 2 == 0) # [2,4,6,8,10]
pares.count() # 5
pares.count(lambda x: x > 6) # 2

project = (
    linq.where(lambda x: x % 2 == 0)
        .select(lambda x: { "item": x })
)

Author

Wellington Junior

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

linq_py_net-0.0.1.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

linq_py_net-0.0.1-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file linq_py_net-0.0.1.tar.gz.

File metadata

  • Download URL: linq_py_net-0.0.1.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for linq_py_net-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e7726069f0cfc480aa1a5a38a9eea682066a53a46f14ff7ff6d794232de27132
MD5 3321da10d8e07603ab13587c37b928d3
BLAKE2b-256 c75ba77518f50995bf0d5555dc446b0356400ae34ace5e1f2c1c0fa722909e5d

See more details on using hashes here.

File details

Details for the file linq_py_net-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: linq_py_net-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for linq_py_net-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5cf09ed8789c25170c8b1c413015fcc3cb811d7aaa9caab45b84a9e977da30a4
MD5 6d1e535c578c8a4295a8415ad466cf62
BLAKE2b-256 771075fafe9e41ba484a6ea21a1704350b8c7e07bd6afc8c7531a75fbd1860e9

See more details on using hashes here.

Supported by

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