Saravanan666/pypi-org huggingface dataset:
Package: plemmy
Plemmy: a Python package for accessing the Lemmy APIPlemmy allows you to interact with any Lemmy instance using Python and theLemmyHttp API.WARNING:Plemmy is still in development and needs testing!InstallationFor the most up-to-date version of Plemmy, clone and install from the repository:git clone https://github.com/Fedihosting-Foundation/plemmy
cd plemmy
python -m pip install .A PyPI repository is updated whenever a new version is available:python -m pip install plemmyBasic usageInteract with a Lemmy instance using theLemmyHttpobject:fromplemmyimportLemmyHttp# create object for Lemmy.ml, log insrv=LemmyHttp("https://lemmy.world")srv.login("<username_or_email>","<password>")Access specific communities:fromplemmy.responsesimportGetCommunityResponse# obtain community, parse JSONapi_response=srv.get_community(name="Lemmy")response=GetCommunityResponse(api_response)# community infocommunity=response.community_view.communityprint(community.name)print(community.actor_id)print(community.id)# list community moderatorsforpersoninresponse.moderators:print(person.moderator.name,person.community.name)Create a post:fromplemmy.responsesimportPostResponse# create post, parse JSONapi_response=srv.create_post(community.id,"Test post please ignore","Body text")response=PostResponse(api_response)# post infopost=response.post_view.postprint(post.creator_id)print(post.community_id)print(post.name)print(post.body)Full documentation is on its way, but in the meantime check out our source code and someexamples.Reporting issues, making contributions, etc.Don't hesitate to report a bug or unexpected results! Want to contribute? Make a pull request. Contact@tjkesslerwith any questions.
Package: plenario-client
# Plenario ClientThis library serves as the official Python client to the[Plenario API](https://plenario.docs.apiary.io/#).## RequirementsThis will run on Python 3.6 or better. Older versions of Python are notsupported. This library requires the installation of the[requests library](http://docs.python-requests.org/en/master/).## UsageThere are 2 API endpoints to Plenario:- The list endpoint that gets metadata about the data sets- The detail endpoint that gets records from the data sets### Accessing Data Set RecordsPlenario API responses are paginated, so naturally we need to provide userswith the ability to page through data as easily as possible. To do this, weprovide a simple iterator baked into the data sets:```pythonfrom plenario_client import PlenarioClientclient = PlenarioClient()data_set = client.get_data_set('chicago-stuff')for page in data_set:do_something_with_the(page)```The _page_ here is the response object: it has a `meta` attribute that includesthe response metadata and a `records` attribute that includes the responsebody -- a list of dictionaries.### Filtering with Query ParametersFiltering can be a little complicated depending on your needs. To handle that,we've come up with a pretty simple solution. Somewhat similar to Django andElasticsearch-DSL we have an `F` class with which you construct and composequery parameters to filter the results.There are three operations:- Basic init with `F('field name', 'query operator', 'query value')`- Appending filters with `F() &= F()`- Overriding filters with `F() |= F()`Here's an example:```pythonfrom plenario_client import PlenarioClient, F# let's build a filter where we want items whose name is 'vince'# and their age is greater than or equal to 21:params = F('name', 'eq', 'vince')params &= ('age', 'ge', 21)  # appending works with either an F or a tuple# let's now say we want to add 'bob' to the filter as well:params &= ('name', 'eq', 'bob')# at this point if we inspect the filter we would get something like{'name': [('eq', 'vince'),('eq', 'bob')],'age': ('ge', 21)}# now let's say that due to some logic happening in our script,# we've determined that neither 'vince' nor 'bob' are desireable# values -- we need 'alice':params |= ('name', 'eq', 'alice')# now under the hood, our filter looks like{'name': ('eq', 'alice'),'age': ('ge', 21)}# now we're ready to fire off the request:client = PlenarioClient()client.describe_data_sets(params=params)```## Developing and ContributingTo run the tests locally:```bash$ pipenv install --dev$ pipenv run python -m pytest```To push a relase to PyPI:```bash$ pipenv run python setup.py sdist bdist_wheel$ pipenv run twine upload dist/*```
Package: plenario-core
UsageComing SoonDevelopmentFire up a virtualenv and install the dev requirements:$ python3.6 -m venv .env
$ source .env/bin/activate
$ pip install -r dev-requirements.txtTo run the tests, in a separate terminal pull in the PostGIS docker image and create the database:$ docker pull mdillon/postgis
$ docker run -d -p 5432:5432 mdillon/postgis
$ docker ps
...
$ docker exec -it {container hash} /bin/bash
...
# su postgres -c psql
...
> create database plenario;Then all you have to do is run the tests normally:$ coverage run manage.py test
$ coverage report
$ flake8
Package: plenario-exporter-s3
UsageThis is both a simple application and a rather complicated application. The
actions it performs are straight forward - create a job to export a data set,
zip up the generated CSVs, upload them to Amazon S3, and email the requestor.The application usesdjango-channels: it’s a new asynchronous back end for
Django, thus relieving us of the hassle of running separate instances forceleryandflower. It has its own baggage though - in production it has
its own server environment and relies on Redis for message passing.Overall, it’s pretty snappy and I’m confident thatchannelsis the future
of Django, and notcelery.To wire this up, it’s a relatively simple install:# your site/settings.py
INSTALLED_APPS = [
    'whatever django and local stuff',
    'channels',  # necessary to make exporter go
    'plenario_exporter_s3',  # this app
]

CHANNEL_LAYERS = {
    'default': {
        'BACKEND': 'asgi_redis.RedisChannelLayer',
        'CONFIG': {
            'hosts': [os.environ.get('REDIS_URL', 'redis://localhost:6379')],
        },
        'ROUTING': 'plenario_exporter_s3.routing.channel_routing',
    },
}You’re also going to need anasgi.pyfile alongside your wsgi file:import os
import channels.asgi

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'your app.settings')
channel_layer = channels.asgi.get_channel_layer()And in your views, wire up the provided export service function as theasync_handlerargument to theplenario-coreexport view:from plenario_core.views.export import GenericMetaExportView
from plenario_exporter_s3.services import create_models_and_start_job

from .models import EtlEventMeta

export_meta = GenericMetaExportView.as_view(
    models=[EtlEventMeta],
    async_handler=create_models_and_start_job)DevelopmentFire up a virtualenv and install the dev requirements:$ python3.6 -m venv .env
$ source .env/bin/activate
$ pip install -r dev-requirements.txtTo run the tests, in a separate terminal pull in the PostGIS docker image and create the database:$ docker pull mdillon/postgis
$ docker run -d -p 5432:5432 mdillon/postgis
$ docker ps
...
$ docker exec -it {container hash} /bin/bash
...
# su postgres -c psql
...
> create database plenario;You’re also going to need a local Redis server running:$ docker pull redis
$ docker run -d -p 6379:6379 redisThen all you have to do is run the tests normally:$ coverage run manage.py test
$ coverage report
$ flake8
Package: plenario-mailer-core
UsageThis package has a handful of useful shortcuts to send informational emails to
data set contributors and admins. The functions can be wired up to be used
with the data set event signals provided inplenario-core. For example:from plenario_core.signals import data_set_approved
from plenario_core_mailer import mailer

def notify_approval(meta_model: MetaBase) -> None:
    mailer.send_data_set_approved(meta_model)

data_set_approved.connect(notify_approval)Now, when a data set is marked as approved,plenario-corewill fire off the
signal and the defined handler will pick it up and call the mailer function.DevelopmentFire up a virtualenv and install the dev requirements:$ python3.6 -m venv .env
$ source .env/bin/activate
$ pip install -r dev-requirements.txtTo run the tests, in a separate terminal pull in the PostGIS docker image and create the database:$ docker pull mdillon/postgis
$ docker run -d -p 5432:5432 mdillon/postgis
$ docker ps
...
$ docker exec -it {container hash} /bin/bash
...
# su postgres -c psql
...
> create database plenario;Then all you have to do is run the tests normally:$ coverage run manage.py test
$ coverage report
$ flake8
Package: plenary
plenaryA library of convenient utility methods and classes. Designed to work in pure python.AcknowledgmentsDeveloped atSwinburne University of Technology. If used in an academic project, please consider citing this work as it helps attract funding and track research outputs:C. J. Harrison and M. Shafiei. plenary. (2022). [Online]. doi: https://dx.doi.org/10.5281/zenodo.7002489This activity received funding fromARENAas part of ARENA’s Research and Development Program – Renewable Hydrogen for Export (Contract No. 2018/RND012). The views expressed herein are not necessarily the views of the Australian Government, and the Australian Government does not accept responsibility for any information or advice contained herein.The work has been supported by theFuture Energy Exports CRCwhose activities are funded by the Australian Government's Cooperative Research Centre Program.
Package: plend
plendPlend is a library for performing least cost formulation with Python. Plend usesPuLPto solve formula constraint problems.Installation$ pip install git+https://github.com/bherbruck/plendor$ pip install plendExamplesfromplendimportFormula,Ingredient,Nutrientfromplend.presets.poultryimport*# initialize formulastarter=Formula(name='Starter',batch_size=100)# add ingredient constraints from poultry presetsstarter.add_ingredient(corn,minimum=1)starter.add_ingredient(soybean_meal)starter.add_ingredient(oil,maximum=5)starter.add_ingredient(limestone)starter.add_ingredient(meat_meal,maximum=10)# add nutrient constraints from poultry presetsstarter.add_nutrient(energy,minimum=3000)starter.add_nutrient(protein,minimum=20)starter.add_nutrient(fiber)starter.add_nutrient(calcium,minimum=4,maximum=5)# optimize the formulastarter.optimize()# output the formula to a csvprint(starter.to_csv())outputs:library_nameformula_nameformula_codeformula_costformula_statusitem_typeitem_nameitem_codeitem_amountitem_minimumitem_maximumdefaultStarter67.16379819OptimalingredientCorn54.8829341defaultStarter67.16379819OptimalingredientSoybean Meal22.6745420defaultStarter67.16379819OptimalingredientOil4.155254105defaultStarter67.16379819OptimalingredientLimestone8.28727010defaultStarter67.16379819OptimalingredientMeat Meal10.0010defaultStarter67.16379819OptimalnutrientEnergy3000.00000383000defaultStarter67.16379819OptimalnutrientProtein20.0000002120defaultStarter67.16379819OptimalnutrientFiber2.052309610defaultStarter67.16379819OptimalnutrientCalcium4.000000015445
Package: plenopticam
PlenoptiCam comes as a cross-platform, open-source software (see releases page) for scientific light field computation with few dependencies and a lean graphical user interface.
Raw exposures from a plenoptic camera require four-dimensional image alignment in order to be decoded as a light field. Provided software addresses this by its ability to calibrate an image taken by a plenoptic camera and extract sub-aperture images or synthetically focused photographs.
This application is meant for researchers, developers, beginners and other fiddlers who like to experiment with light field technology. Its scope comprises custom-types of plenoptic cameras and is thus not limited to Lytro’s image data.
Package: plenty-api
OverviewInterface for the PlentyMarkets API.SetupRequirementsPython 3.7.8+InstallationInstall it directly into an activated virtual environment:$ pip install python_plenty_apior add it to yourPoetryproject:$ poetry add plenty_apiUsageAfter installation, the package can imported:$ python
>>> import plenty_api
>>> plenty_api.__version__Examplesimport plenty_api

def main():
    # Get the bearer token and set the basic attributes for an endpoint
    plenty = plenty_api.PlentyApi(base_url='https://{your-shop}.plentymarkets-cloud01.com',  # available under setup->settings->API->data
                                  use_keyring=True,  # Save the credentials into your system wide Keyring or not
                                  data_format='json',  # Choose the output format (default JSON)
                                  debug=True)  # display the constructed endpoint before making the request

    orders = plenty.plenty_api_get_orders_by_date(start='2020-09-20',
                                                  end='2020-09-24',
                                                  date_type='payment',  # Get orders that were payed in between [start] and [end]
                                                  additional=['documents', 'locations'],  # Include additional attributes to the response
                                                  refine={'orderType': '1', 'referrerId': '1'})  # Only get orders with type 1 and from referrer 1

if __name__ == '__main__':
    main()ContactAuthor: Sebastian Fricke, Company: Panasiam, Email:sebastian.fricke.linux@gmail.com
Package: plenty-taxhub-generator
plenty_taxhub_generatorDescriptionCreate a Tax Hub Report with sales order and refunds from PlentyMarkets.
Tax Hub is a report used byDutyPay.Installationpoetry install plenty_taxhub_generatororpython3 -m pip install plenty_taxhub_generator --user --upgradeUsagePrepare a configuration file with the following format:[General]
base_url=https://{your-plenty-cloud}.plentymarkets-cloud01.com

[Mappings]
referrer_id={IDs of the order origins}
country_id=AT=2,CZ=6,ES=8,FR=10,GB=12,IT=15,PL=23 # list of countries where VAT is charged

[fixed_values]
source_zone=DE
market_zone_currency=EURAnd place the config at:/home/user/.plenty_taxhub_generator_config.inifor Linux systemsC:\\Users\user\.plenty_taxhub_generator_config.inifor Windows systemsCreate a API user on PlentyMarkets:
Setup-> Settings-> User-> Accounts-> New-> Access: REST-APIThen just run the program:python3 -m plenty_taxhub_generator --from 2020-09-01 --to 2020-09-30Please provide the date in one of the following formats:YYYY-MM-DDTHH:MM:SS+UTC-OFFSETYYYY-MM-DDTHH:MMYYYY-MM-DDYou will be asked to provide your API credentials from Plentymarkets. Afterwards these will be saved into your Keyring (system intern password storage) for a certain amount of time.The report will be placed by default at your current working directory. But you can provide a different location with the-o/--outoption.You can view the mappings in your config with the-m/--mappingsoption.
And you can change the base URL of your PlentyMarkets system with-c/--url/--change_url.
Package: plex
Plex is a library building lexical analysers.Plex is a Python module for constructing lexical analysers, or scanners. Plex
scanners have almost all the capabilities of the scanners generated by GNU Flex,
and are specified in a very similar way. Tokens are defined by regular
expressions, and each token has an associated action, which may be to return a
literal value, or to call an arbitrary function.Plex is designed to fill a need that is left wanting by the existing Python
regular expression modules. If you’ve ever tried to use one of them for
implementing a scanner, you will have found that they’re not really suited to
the task. You can define a bunch of regular expressions which match your tokens
all right, but you can only match one of them at a time against your input. To
match all of them at once, you have to join them all together into one big r.e.,
but then you’ve got no easy way to tell which one matched. This is the problem
that Plex is designed to solve.Another advantage of Plex is that it compiles all of the regular expressions
into a single DFA. Once that’s done, the input can be processed in a time
proportional to the number of characters to be scanned, and independent of the
number or complexity of the regular expressions. Python’s existing regular
expression matchers do not have this property.More documentationYou can get more information in the Sphinx-based documentation, located athttp://packages.python.org/plex/.Feedback and getting involvedIssue tracker:http://code.google.com/p/python-plex/issues/listCode Repository:http://code.google.com/p/python-plex/ContactOriginal author :Greg Ewing <greg@cosc.canterbury.ac.nz>,Computer Science Department,University of Canterbury,Christchurch,New ZealandMaintainer : Stephane Klein <stephane@harobed.org>Changes2.0.0 (2009-12-13)Create a Plex python packageConvert documentation to SphinxConvert tests to noseFormat the source code with PEP8 recommendations4 spaces indentationconvert package and modules names to lowers cases1.1.5Eliminated a syntax warning about assigning to None when using with Python
2.3.1.1.4Fixed bug causing argument of Rep or Rep1 to fail to match following a
newline.1.1.3Fixed bug causing Eol to fail to match at the beginning of a line in some
circumstances.1.1.2Changed Scanner.yield() to Scanner.produce() to accommodate Python 2.3, where
yield is a keyword.Changed test10 to not rely so much on details of string repr.1.1.1Fixed two minor bugs: uncommented Scanner.next_char() and added import of
types to Regexps.py.1.1Added support for case-insensitive matches.1.0First official release.
Package: plex3
Plex is a library building lexical analysers.Plex is a Python module for constructing lexical analysers, or scanners. Plex
scanners have almost all the capabilities of the scanners generated by GNU Flex,
and are specified in a very similar way. Tokens are defined by regular
expressions, and each token has an associated action, which may be to return a
literal value, or to call an arbitrary function.Plex is designed to fill a need that is left wanting by the existing Python
regular expression modules. If you’ve ever tried to use one of them for
implementing a scanner, you will have found that they’re not really suited to
the task. You can define a bunch of regular expressions which match your tokens
all right, but you can only match one of them at a time against your input. To
match all of them at once, you have to join them all together into one big r.e.,
but then you’ve got no easy way to tell which one matched. This is the problem
that Plex is designed to solve.Another advantage of Plex is that it compiles all of the regular expressions
into a single DFA. Once that’s done, the input can be processed in a time
proportional to the number of characters to be scanned, and independent of the
number or complexity of the regular expressions. Python’s existing regular
expression matchers do not have this property.ContactOriginal author :Greg Ewing <greg@cosc.canterbury.ac.nz>,Computer Science Department,University of Canterbury,Christchurch,New ZealandMaintainer : Stephane Klein <stephane@harobed.org>Changes2.0.0 (2009-12-13)Create a Plex python packageConvert documentation to SphinxConvert tests to noseFormat the source code with PEP8 recommendations4 spaces indentationconvert package and modules names to lowers cases1.1.5Eliminated a syntax warning about assigning to None when using with Python
2.3.1.1.4Fixed bug causing argument of Rep or Rep1 to fail to match following a
newline.1.1.3Fixed bug causing Eol to fail to match at the beginning of a line in some
circumstances.1.1.2Changed Scanner.yield() to Scanner.produce() to accommodate Python 2.3, where
yield is a keyword.Changed test10 to not rely so much on details of string repr.1.1.1Fixed two minor bugs: uncommented Scanner.next_char() and added import of
types to Regexps.py.1.1Added support for case-insensitive matches.1.0First official release.
Package: plex.activity.py
Real-time activity extension for plex.pyLicenseThe MIT License (MIT)Copyright (c) 2014 Dean GardinerPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Package: plexauth
python-plexauthHandles the authorization flow to obtain tokens from Plex.tv via external redirection.Example usage:import asyncio
from plexauth import PlexAuth

PAYLOAD = {
    'X-Plex-Product': 'Test Product',
    'X-Plex-Version': '0.0.1',
    'X-Plex-Device': 'Test Device',
    'X-Plex-Platform': 'Test Platform',
    'X-Plex-Device-Name': 'Test Device Name',
    'X-Plex-Device-Vendor': 'Test Vendor',
    'X-Plex-Model': 'Test Model',
    'X-Plex-Client-Platform': 'Test Client Platform'
}

async def main():
    async with PlexAuth(PAYLOAD) as plexauth:
        await plexauth.initiate_auth()
        print("Complete auth at URL: {}".format(plexauth.auth_url()))
        token = await plexauth.token()

    if token:
        print("Token: {}".format(token))
    else:
        print("No token returned.")

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Package: plexcli
CLI for PlexAboutInstallation provides a command line utility (plex) which can be used to
interact with Plex services. Commands are subtasks of the plex utility.
The full list of subtasks are visible by running ‘plex –help’.Requirementssyndicate Python Libraryhumanize Python LibraryPlex AccountPlex Server [and/or Client (soon)]InstallationPyPi Stable Releasepip3 install plexcliDevelopment Releasepython3 ./setup.py build
python3 ./setup.py installorpython3 ./setup.py developCompatibilityPython 3.4+Mac OSX NotesI feel compelled to make a note about OSX as I’ve decided to only
support Python 3.4+ for this tool. In my experience, using Python 3 as
installed by Homebrew and setuptools as installed by pip, a usable PATH
is not provided and/or symlinking behavior for python3 setuptools
scripts is not handled.To work around this I’m simply adding the ‘bin’ directory used for the
Python 3 framework to my PATH variable, a la..PATH=$PATH:/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/binI welcome someone explaining to me a better solution.