Saravanan666/pypi-org huggingface dataset:
Package: list-lookup
ListLookupWrapper for faster lookups in a list of objects/dictionaries.ATTENTIONDo not modify list once indexes are created!from listlookup import ListLookup
cities = ListLookup([
  {"id": 1, "country": "us", name: "Atlanta"},
  {"id": 2, "country": "us", name: "Miami"},
  {"id": 3, "country": "uk", name: "Britain"},
  {"id": 4, "country": "ca", "name": "Barrie"},
])

cities.index("id", lambda d: d['id'], True)
cities.index("country", lambda d: d['country'])

list(cities.lookup(id=1))
>>> [{"id": 1, "country": "us", name: "Atlanta"}]

list(cities.lookup(country="us", preserve_order=True))
>>> [{"id": 1, "country": "us", name: "Atlanta"}, {"id": 2, "country": "us", name: "Miami"}]

list(cities.lookup(id=2, country="uk"))
>>> []

cities.index('name', lambda d: d['name'])
list(cities.lookup(name=lambda val: val.startswith('B'))
>>> [{"id": 3, "country": "uk", name: "Britain"}, {"id": 4, "country": "ca", "name": "Barrie"}]Case insensitive indexThis is not supported out of the box. You need to use same case for index and lookup values. E.g. use.lower()from listlookup import ListLookup
cities = ListLookup([
  {"id": 1, "country": "us", name: "Atlanta"},
  {"id": 2, "country": "us", name: "Miami"},
  {"id": 3, "country": "uk", name: "Britain"},
  {"id": 4, "country": "ca", "name": "Barrie"},
])

cities.index("country_ci", lambda d: d['country'].lower())

list(cities.lookup(country_ci="UK".lower()))
>>> [{"id": 3, "country": "uk", name: "Britain"}]Multiple pointers per itemYou can have same record be referenced by multiple values. In the following example "uk" and
"uk2" correspond to the same record because they are returned as alternatives during indexing:from listlookup import ListLookup
cities = ListLookup([
  {"id": 1, "country": "us", name: "Atlanta"},
  {"id": 2, "country": "us", name: "Miami"},
  {"id": 3, "country": "uk", name: "Britain"},
  {"id": 4, "country": "ca", "name": "Barrie"},
])

cities.index("country_alt", lambda d: [d['country'], "%s2" % d['country']], multiple=True)

list(cities.lookup(country_alt="uk"))
>>> [{"id": 3, "country": "uk", name: "Britain"}]

list(cities.lookup(country_alt="uk2"))
>>> [{"id": 3, "country": "uk", name: "Britain"}]
Package: listmaker
A simple list making utility.This command line utility makes it easy to manage hierarchical lists. You can
have any number of lists with any number of sub-lists and keep repeating this
to any depth you choose. Note that this is primary meant for use by humans and
will perform poorly if used for large lists created or read by automatons.The utility follows a modal approach like Vim to make input commands simple.
While in normal mode, you can navigate around the document. When in Edit mode
you can add or edit text.At this stage, the utility is quite barebones and is missing a fair bit of
functionality. I consider it the bare minimum of what’s usable. The following
features are supported:
- Editing text
- Saving file
- Adding child nodes
- Adding sibling nodes
- Deleting nodesEssential features that arenot yet implemented:
- Scrolling (yes, I’m sorry! very high on list to fix)
- Undo
- Not saved warning
- Move nodes from one parent to another.
- Indent/unindent nodes
- Resizing terminal window
- Copy/paste
- Collapsing/expanding sub-lists.Features to be implemented down the road:
- Zooming in and out of sub-lists.
- Adding detailed text to nodes
- Tagging nodes with keywords for searching
Package: listManager
This project has been made to easier to manage lists in Python 3.
Sometimes for newbies manage elements into lists can be frustrating, and can
make a simple problem become an upset problem.FunctionabilityOn this package are in total twelve functions to help you work with lists.subtract_elements()Allows subtraction from left values to right side values. Returns a list.multiply_elements()This function allows to multiply elements in list. Returns a list.divide_elements()Allows to divide from left to right side. Returns a list.remove_repeated_elements()Will remove repeated elements in array. Returns the array without repeated elements.return_common_elements()Returns common elements between two arrays. Returns a list.return_uncommon_elements()Returns uncommon elements between two arrays. Returns a list.return_element_index()Returns index(es) for a specific element in array. Returns a list.element_average()Returns the percentage represented by element in the array. Returns a float.array_average()Returns the array average. Returns a float.array_mode()Returns array mode. Returns an integer.odd_array_median()Returns median for an odd array. Can return a float or an integer.pair_array_median()Returns median for a pair array. Returns a float.
Package: list-manager
List ManagerA CLI tool that allows for list managementHow To UseThis tool is meant to be used as a CLI (command line interface). You will need to install the package from pypipipinstalllist_managerAfter installing, you can immediately start using the tool from your command lineShow All Listslist_managerget_listsShow All Items In Listlist_managerget_list-l<list-name>Create Listlist_managercreate_list-l<list-name>-i<optional-initial-list-item>Add Item To Listlist_manageradd_item-l<list-name>-i<item-name>Delete Item From Listlist_managerdelete_item-l<list-name>-i<item-name>Delete Listlist_managerdelete_list-l<list-name>
Package: listmatch
List MatchRegexes for lists.Free software: MIT licenseDocumentation:https://listmatch.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.The code was adapted fromhttps://github.com/xysun/regexHistory0.1.0 (2016-12-09)First release on PyPI.
Package: listme
listmeSummarize you FIXME, TODO, XXX (and other tags) comments so you don't forget them.Features⚡ Blazingly fast recursive search! Thanks toripgrep, massive codebases can be scanned very quickly.🌈 A nice and pretty summary with comment counts per tag is printed for each file.🏷 Tags can be customized by the user.🖨 Print the git author of each message, highlighting old commits.This project was inspired by practical needs and byfixme. Since fixme is no longer maintained, it makes sense to have a new package (this time written in Python using ripgrep written in Rust) with some new features.InstallationThis package requires Python 3.8+, a recent version ofgitandripgrep(13.0+). Both git and ripgrep should be available in your PATH. Then install with pip:pip install listmeUsageSimply call listme with the folder or file of interest as the first argument.listme.You should see an output like this:Ripgrep uses.gitignorefiles present in your folders to ignore certain directories and files. If you want to add filters on top of ripgrep, use the--glob (-g)option.Comments that were commited too long ago (limit set be the--age-limitparameter) are maked as old before the author's name:[☠ OLD John Doe]ConfigurationMost terminals should support all the Unicode symbols used in this project. If not, a patched font (e.g. one ofnerd fonts) is higly recommended. Still, to ensure compatibility across many terminal emulators and fonts, a configuration wizard will pop up the first time you run listme asking if some symbols are rendered correctly.To run the configuration wizard again, simply run:listme-configOptionspath: Path to folder or file to scan for comments with tags.--tags (-T): The tags that will be searched, input should be separated by spaces. Tags are shown in the file summary in the order defined here. Default tags: BUG, FIXME, XXX, TODO, HACK, OPTIMIZE, NOTE.--glob (-g): Glob pattern to include/exclude files or folders in the search. Must be a single-quoted string. This argument is passed to ripgrep, so checkripgrep documentationfor syntax details.--age-limit (-l): Age limit (commit age) for comments. Comments older than this limit are marked.--relative-path (-r): Use relative paths in the output. This is the default.--full-path (-R): Use full absolute paths in the output.--author (-a): Print git commit author names. This is the default.--no-author (-A): Do not print git commit author names.--summary (-s): Print a nice file summary. This is the default.--no-summary (-S): Do not print a nice file summary.--verbose (-v): print files which were ignored due to parsing errors.Style optionsThe output can be printed in full (--full, the default), black-and-white (-b) or plain style (-p). Full style is recommended, and the only difference to black-and-white is (of course) colors.Plain style is aimed towards machine consumption. The format is basically a filename line followed by all the comments in the formatTAG:text. All comment lines are indented with one tab.
Package: list-methods
list_methods [Experimental]Tired of not having map, filter and reduce easily available like in
Javascript, Java, Kotlin, etc? Fear not, this is the package for you(sort of).Experimental package adding .map(), .filter() and .reduce() as list methods.
Made mostly as PoC showing how the Python language can be extended in some way.Installationpip install list_methodsUse>>> from list_methods import L
>>> l = L([1,2,3])
>>> plus_one = lambda x : x+1
>>> greater_than_one = lamda x : x > 1
>>> l.map(plus_one).c()
L([2,3,4])
>>> l.filter(greater_than_one).c()
L([2,3])
>>> l.map(plus_one).map(plus_one).filter(greater_than_one).c()
L([3,4,5])
>>> agg_plus = lambda x,y: x+y
>>> l.reduce(agg_plus)
6GotchasRemember to call the .c() method since this resets the object so it can be used
further. This is not necessary when ending the chain of operations with .reduce()Javascript> l = [1,2,3]
> l.map(x => x +1)
[2,3,4]
> l.map(x => x +1)
[2,3,4]list_methods - Python>>> l.map(plus_one)
L([2,3,4])
>>> l.map(plus_one)
L([3,4,5])Gotcha #2The list needs to be copied when instantiating the object so it can be reset for other use. In the future one should maybe add a flag to skip this list copy if the list is only used in one place.TODOWrite testsWrite benchmarksTest a implementation where a new instance of the class is returned instead of self
Package: listmodel
Listmodel is a Python library for object mappings for various list sources (XML documents, CSV documents, text documents, JSON/YAML objects) in a unified manner. Inspiration was taken fromQMLXmlListModel.Basic usage>>>fromlistmodelimportXMLDoc,QueryAttr,set_name>>>xml=u"""<bookshelf>
...         <name>My Bookshelf</name>
...         <book>
...             <title>1984</title>
...             <author>Orwell, George</author>
...             <isbn>978-0-452-28423-4</isbn>
...             <chapter id="1">...</chapter>
...             <chapter id="2">...</chapter>
...             <chapter id="3">...</chapter>
...         </book>
...         <book>
...             <title>The man in the high castle</title>
...             <author>Dick, Philip K.</author>
...             <isbn>0679740678</isbn>
...             <chapter id="1">...</chapter>
...             <chapter id="2">...</chapter>
...             <chapter id="3">...</chapter>
...         </book>
...     </bookshelf>
... """>>>classBookshelf(XMLDoc):...classIterable(XMLDoc):...__query__="/bookshelf/book"......@set_name("Chapter")...classIterable(XMLDoc):...__query__="chapter"...id=QueryAttr("@id")......isbn=QueryAttr("isbn/text()")...title=QueryAttr("title/text()")...author=QueryAttr("author/text()")......@QueryAttr("author/text()")...defauthor_first_name(self,value):...returnvalue.split(", ")[1]......name=QueryAttr("/bookshelf/name/text()")>>>shelf=Bookshelf.fromstring(xml)>>>shelf<Bookshelf(name='My Bookshelf')>>>>shelf.name'My Bookshelf'>>>books=list(shelf)>>>len(books)2>>>books[1].title'The man in the high castle'>>>books[1].author_first_name'Philip K.'>>>list(books[0])[<Chapter(id='1')>,<Chapter(id='2')>,<Chapter(id='3')>]
Package: listmonk-api
Listmonk APIVersion: 0.3.0Listmonk API Python WrapperThis repository is actively maintained - Contributions are welcome!API Calls:SubscribersListsImportCampaignsMediaTemplatesTransactionalUsage:#!/usr/bin/python# coding: utf-8importlistmonk_apiusername="<LISTMONK USERNAME>"password="<LISTMONK_PASSWORD>"listmonk_api_url="<LISTMONK_URL>"client=listmonk_api.Api(url=listmonk_api_url,username=username,password=password)lists=client.get_lists()print(f"Lists:{lists}")created_list=client.create_list(name="EXAMPLE TEMPLATE",type="<public/private>",optin="<single/double>",tags=['<LIST TAG>'])print(f"Created List:{created_list}")created_campaign=client.create_campaign(name="EXAMPLE TEMPLATE",type="<public/private>",optin="<single/double>",tags=['<LIST TAG>'])print(f"Created Campaign:{created_campaign}")print(f"Subscribers:{client.get_subscribers()}")print(f"Campaigns:{client.get_campaigns()}")Installation Instructions:Install Python Packagepython-mpipinstalllistmonk-apiRepository Owners:
Package: listmonk-wrapper
ListmonkWrapperLight Python wrapper for listmonk.appPyPI:https://pypi.org/project/listmonk-wrapper/Free software: BSD-3-ClauseTestingMust have local listmonk container running (TODO: add docker container in repo for testing purposes)poetry install -E dev -E testpoetry run pytestUsagepip install listmonk-wrapperfrom listmonk_wrapper import ListMonkClient

    client = ListMonkClient(host="http://localhost", port=9000, username="password", password="password")
    my_campaigns = client.get_campaigns()
Package: listo
listoListo is an enhanced version of thelisttype that aims to do the following:Make behavior more consistent. No more methods with "in-place" changes. Every method call returns a valueAdds methods that are missing from thelisttype. For example,listohas afirstmethod that returnsself[0]A list of arguments passed in will be converted to alistoobject, but a single argument that is an iterator will be unpacked into alistoobject. This is useful for when you want to pass in a generator or other iterator into a function that expects a listUsageFirst install it via pip, poetry, or whatever you usepipinstalllistoThen use it in your codefromlistoimportlistolst=listo(1,2,3)assertlst.first()==1assertlst.last()==2Usage: How listo handles initial argumentsFor arguments passed in, it just converts them to alistoobjectlst=listo(1,2,3)assertlst==[1,2,3]lst2=listo([1,2,3])# list is unpackedassertlst2==[1,2,3]lst3=listo((1,2,3))# tuple is converted and unpackedassertlst3==[1,2,3]lst4=listo([1,2,3],(1,2))# Two args mean nothing is unpackedassertlst4==[[1,2,3],(1,2)]This is different from standard Python iterator behavior.Contributing to ListoHave you tried using Listo and found it useful? Do you have ideas for how to make it better?We welcome contributions from the community!SeeCONTRIBUTING.mdfor details on how to set up your development environment to contribute to this project, run tests, check code quality, release new versions, and more.
Package: listoapi
InstallDocumentationInstallpip install listoapiDocumentationComplete documentation can be found athttps://apidocs.listo.mx/.Startfrom listoapi import ListoApi

api = ListoApi("your_listo_token")Search invoicesinvoice = next(api.Invoices.search(uuid="00112233-4455-6677-8899-AABBCCDDEEFF"))orfor invoice in api.Invoices.search(issued_on="m:2018-05-01T00:00:00"):
    # Your codeFull details of invoiceapi.Invoices.details(invoice['id'])Add or delete paymentsapi.Invoices.add_payment(invoice['id'], bank_account=1234, amount=200, amount_mxn=200,
                         effective_on=""2018-07-24T00:00:00)
api.Invoices.delete_payments(invoice['id'])Generate invoiceapi = ListoApi("your_listo_token", "path/to/cer/file.cer", "path/to/key/file.key", "key_password")
generation_data = [{...}]

res, certification_data, original_chain = next(api.Invoicing.generate(generation_data, staging=False, certify=True))
Package: listools
listoolsis a Python 3 package of which provides utility functions for dealing with lists in Python 3.listoolssupports Python version 3.5 and newer. You can install it usingpip install listools.This package contains four modules:flatools,iterz,listutilsandllogic. All functions have a__doc__attribute with usage instructions.Documentation is available athttps://gilbertohasnofb.github.io/listools-docs/.A pdf version of the documentation is also available in thedocsdirectory.Bugs can be reported tohttps://github.com/gilbertohasnofb/listools/issues.This library is published under the MIT License.
Package: list_operations
——-unnest -——-
Given a list of nested lists and/or nested tuples (a complex nested structure of list/tuples that is not known), the unnest function will extract and return single elements only (strings, floats, integers) that were inside these list and/or tuple structures.——-list2dict -——-
Given a list of strings that may or may not be duplicated, the list2dict function outputs a dictionary having keys equal to the unique strings in the list and values equal to the number of times the string is repeated in the list (count).
Package: list-packages
list_packagesA utility to retrieve a list of installed Python packages and their dependencies.Technical DetailsPyPIInstallationpipinstalllist-packagesAlternative:pipinstallgit+https://github.com/maurya-anand/py-list-packages.gitExample usageTerminalAfter installing the package, you can run the list-packages command in the terminal to list all installed Python packages and their dependencies:list_packagesOutputPackageDependencysetuptools==59.6.0NoneJinja2==3.1.2markupsafe>=2.0requests==2.31.0charset-normalizer<4,>=2,certifi>=2017.4.17,urllib3<3,>=1.21.1,idna<4,>=2.5The output can also be obtained injsonformat by using the following command in the terminallist_packagesjsonPython script/NotebookTo use list-packages in a Python notebook, you can import the list_packages module and call the list_installed_packages() function.By default, the function returns a list of dictionaries containing package information. Each dictionary has the following keys:package: Package name (str)version: Package version (str)depends: List of dictionaries containing package information (list)fromlist_packagesimportlist_installed_packagesinstalled_packages=list_installed_packages()Output[{'setuptools':'59.6.0','depends':None},{'package':'Jinja2','version':'3.1.2','depends':[{'package':'markupsafe','version':'>=2.0'}]}]If you want the output in JSON format, you can pass the format='json' parameter to the list_installed_packages() function. It will return a JSON-formatted string representing the list of installed packages.fromlist_packagesimportlist_installed_packagesinstalled_packages=list_installed_packages('json')Output[{"package":"setuptools","version":"59.6.0","depends":null},{"package":"Jinja2","version":"3.1.2","depends":[{"package":"markupsafe","version":">=2.0"}]}]LinksChangelogLicense
Package: listpad
# listpad.py[![PyPI version](https://badge.fury.io/py/listpad.svg)](https://badge.fury.io/py/listpad)
[![Python versions](https://img.shields.io/pypi/pyversions/listpad.svg)](setup.py)
[![Build Status](https://travis-ci.org/raviqqe/listpad.py.svg?branch=master)](https://travis-ci.org/raviqqe/listpad.py)
[![License](https://img.shields.io/badge/license-unlicense-lightgray.svg)](https://unlicense.org)List padding library for nested ones## License[The Unlicense](https://unlicense.org)
Package: listparser
listparserParse OPML subscription lists in Python.If you’re building a feed reader and you need to parse OPML subscription lists,
you’ve come to the right place!listparser makes it easy to parse and use subscription lists in multiple formats.
It supports OPML, RDF+FOAF, and the iGoogle exported settings format,
and runs on Python 3.7+ and on PyPy 3.7.Usage>>>importlistparser>>>result=listparser.parse(open('feeds.opml').read())A dictionary will be returned with several keys:meta: a dictionary of information about the subscription listfeeds: a list of feedslists: a list of subscription listsversion: a format identifier like “opml2”bozo: True if there is a problem with the list, False otherwisebozo_exception: (ifbozois 1) a description of the problemFor convenience, the result dictionary supports attribute access for its keys.Continuing the example:>>>result.meta.title'listparser project feeds'>>>len(result.feeds)2>>>result.feeds[0].title,result.feeds[0].url('listparser blog', 'https://kurtmckee.org/tag/listparser')More extensive documentation is available in thedocs/directory
and online at <https://listparser.readthedocs.io/en/stable/>.BugsThere are going to be bugs. The best way to handle them will be to
isolate the simplest possible document that susses out the bug, add
that document as a test case, and then find and fix the problem.…you can also just report the bug and leave it to someone else
to fix the problem, but that won’t be as much fun for you!Bugs can be reported at <https://github.com/kurtmckee/listparser/issues>.
Package: list-property
# list_propertyModule for making list properties or named lists## list_property - function```pythonimport list_propertyclass Person(list):first_name = list_property(0)last_name = list_property(1)middle_initial = list_property(2, '')p = Person(("John", "Smith"))assert p == ["John", "Smith"]assert p.first_name == 'John'assert p[0] == 'John'assert p.last_name == 'Smith'assert p[1] == 'Smith'assert p.middle_initial == ''try:assert p[2] == ''raise AssertionError('Index 2 was not set and there should be an IndexError!')except IndexError:pass  # Successp.first_name = "Hello"p.last_name = 'World!'p.middle_initial = 'T'assert p.first_name == 'Hello'assert p[0] == 'Hello'assert p.last_name == 'World!'assert p[1] == 'World!'assert p.middle_initial == 'T'assert p[2] == 'T'  # Note: p[2] is now set```This class also works like a property decorator```pythonimport list_propertyclass Person(list):@list_property(0)def first_name(self):try:return self[0]except:return 'anonymous'middle_initial = list_property(2)@middle_initial.setterdef middle_initial(self, value):self[2] = str(value)[0].upper()```## namedlistNamed list factory function like named tuple```pythonfrom list_property import namedlist, NamedListPerson = namedlist('Person', 'first_name last_name middle_initial', {'middle_initial': 'T'})p = Person('John', 'Smith')assert p.first_name == 'John'assert p[0] == 'John'assert p.last_name == 'Smith'assert p[1] == 'Smith'assert p.middle_initial == 'T'assert p[2] == 'T'assert isinstance(p, list)assert isinstance(p, NamedList)```
Package: listr
Listris python module that can be used to:iterate list through pointer/cursorcurrent(),next(),prev(),start(),end().iterate list throughiter()(without looping/queue-like)installationpip install listrExample# -*- coding: utf-8 -*-fromlistrimportListrimportunittestclassListrTest(unittest.TestCase):deftest_pointer(self):t=Listr()t.import_list(["one","two","three"])self.assertEqual(t.current(),"one")self.assertEqual(t.next(),"two")self.assertEqual(t.next(),"three")self.assertEqual(t.next(),"one")self.assertEqual(t.prev(),"three")self.assertEqual(t.start(),"one")self.assertEqual(t.end(),"three")deftest_iterator(self):t=Listr()t.import_list(range(1,10))foriint.list:self.assertEqual(i,t.iter())self.assertEqual(t.iter_check(),False)t.iter_reset()self.assertEqual(t.iter_num,0)if__name__=="__main__":unittest.main()Hintyou can access list throughListr.listproperty/attribute.iter()can be access with python native iterator (Listr object is iterable).