Name | linq-py-net JSON |
Version |
0.0.3
JSON |
| download |
home_page | None |
Summary | Extensions methods for the list, inspired in linq csharp |
upload_time | 2024-09-23 18:05:53 |
maintainer | None |
docs_url | None |
author | Wellington Junior |
requires_python | >=3.5 |
license | None |
keywords |
python
linq
csharp
c#
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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](https://pip.pypa.io/en/stable/) to install linq_py_net
```bash
pip install linq-py-net
```
# Usage
```python
from linq_py_net import Linq
linq = Linq([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
Raw data
{
"_id": null,
"home_page": null,
"name": "linq-py-net",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": null,
"keywords": "python, linq, csharp, c#",
"author": "Wellington Junior",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/b7/21/200d9c460184f62c2f3ffd653ad61f30f7ce4e056d52c9841ad8abbb9989/linq_py_net-0.0.3.tar.gz",
"platform": null,
"description": "# linq_py_net\r\n\r\nThe linq_py_net package is used to manage list collections:\r\n\r\n| methods | description |\r\n| ---------------- | ------------------------------------------------------ |\r\n| where | filter itens by lambda predicate |\r\n| count | count itens, lambda predicate is optiona |\r\n| first_or_default | find first item on the sequence, predicate is optional |\r\n| select | project data from list |\r\n\r\n## Installation\r\n\r\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install linq_py_net\r\n\r\n```bash\r\npip install linq-py-net\r\n```\r\n\r\n# Usage\r\n\r\n```python\r\nfrom linq_py_net import Linq\r\n\r\nlinq = Linq([1,2,3,4,5,6,7,8,9,10])\r\n\r\nlinq.first_or_default() # 1\r\n\r\npares = linq.where(lambda x: x % 2 == 0) # [2,4,6,8,10]\r\npares.count() # 5\r\npares.count(lambda x: x > 6) # 2\r\n\r\nproject = (\r\n linq.where(lambda x: x % 2 == 0)\r\n .select(lambda x: { \"item\": x })\r\n)\r\n```\r\n\r\n## Author\r\n\r\nWellington Junior\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Extensions methods for the list, inspired in linq csharp",
"version": "0.0.3",
"project_urls": null,
"split_keywords": [
"python",
" linq",
" csharp",
" c#"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "79cdf639174e875061456563fbc9c72ce30b3b9be53799040d4377792d6142ba",
"md5": "1e389aa272b049e471cc3f5c0bd3543e",
"sha256": "77d37e433f96bd1fe4a76ba17eb83fd1437372382d007fcf6d49d7b2c1567314"
},
"downloads": -1,
"filename": "linq_py_net-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1e389aa272b049e471cc3f5c0bd3543e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 2154,
"upload_time": "2024-09-23T18:05:51",
"upload_time_iso_8601": "2024-09-23T18:05:51.807426Z",
"url": "https://files.pythonhosted.org/packages/79/cd/f639174e875061456563fbc9c72ce30b3b9be53799040d4377792d6142ba/linq_py_net-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b721200d9c460184f62c2f3ffd653ad61f30f7ce4e056d52c9841ad8abbb9989",
"md5": "a35559435a159ab36aeaf562c544f5d9",
"sha256": "f8d7a7d60e2a16a901283b625dcb3e4a41242ade194dc502e959032d79771cf9"
},
"downloads": -1,
"filename": "linq_py_net-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "a35559435a159ab36aeaf562c544f5d9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 1848,
"upload_time": "2024-09-23T18:05:53",
"upload_time_iso_8601": "2024-09-23T18:05:53.799744Z",
"url": "https://files.pythonhosted.org/packages/b7/21/200d9c460184f62c2f3ffd653ad61f30f7ce4e056d52c9841ad8abbb9989/linq_py_net-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-23 18:05:53",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "linq-py-net"
}