Saravanan666/pypi-org huggingface dataset:
Package: pythonaoe2
python-aoe2How to Use:Import the library:>>>frompythonaoe2importaoe2Initialize the Client:>>>client=aoe2.Client()Or if you are running your own instance of the api:>>>client=aoe2.Client("https://your.url.here/"+"api_version")Get Civilizations:>>>client.get_all_civilizations()Civilizations are returned as objects:>>>forcivinclient.get_all_civilizations():>>>print(civ.name)Aztecs...VietnameseGet a Civilization by ID or Name:>>>client.get_civilization("Aztecs").name'Aztecs'>>>client.get_civilization("1").name'Aztecs'>>>Get all Units:>>>forunitinclient.get_all_units():>>>print(unit.name)Archer...EliteWoadRaiderGet a Unit by ID or Name:>>>client.get_unit("1").name'Archer'>>>client.get_unit("Archer").name'Archer'Get all structures:>>>forstructureinclient.get_all_structures():)d))>>>print(structure.name+"|"+str(structure.id))Barracks|1...Keep|59>>>Get Structure by Name or ID:>>>client.get_structure("59").name'Keep'>>>client.get_structure("Keep").name'Keep'Get all Technologies:>>>fortechinclient.get_all_technologies():>>>print(tech.name)Crossbowman...EliteWoadRaiderGet Technology by ID or Name:>>>client.get_technology("1").name'Crossbowman'>>>client.get_technology("Crossbowman").name'Crossbowman'Other Notes:Some information requires additonal API calls with the provided ID/Name values, and some structures have multiple entries for different ages:>>>unit=client.get_unit("4")>>>unit.name'Cavalry Archer'>>>forstructureinclient.get_structure(unit.created_in):>>>print(structure.name+" | "+structure.age)ArcheryRange|FeudalArcheryRange|CastleArcheryRange|Imperial>>>tech=client.get_technology("3")>>>tech.applies_to['crossbowman']>>>tech.develops_in'archery_range'>>>unit=client.get_unit(tech.applies_to[0])>>>unit.name'Crossbowman'
Package: python-apds9930
# Python bindings for APDS-9930Python module for the APDS-9930 I2C Ambient Light and Proximity sensorThis is a Python port of the [AVR APDS-9930 library](https://github.com/Davideddu/APDS9930).Simple and easy to use. Makes heavy use of Python-specific programming concepts, such as properties, to make usage even easier. Depends on `python-smbus`, the I2C library for Python.I tested this on Linux a desktop computer, using the I2C pins of a nVidia graphics card, using the Nouveau graphics driver. This has been reported to work for both ATI and nVidia cards, but not for integrated Intel (and I can confirm this).Check the pinout:![Graphics-I2C pinout](http://members.dslextreme.com/users/paintyourdragon/img/i2c/port-vga.png)* Grey: ground* Red: +5V* Yellow: clock* Blue: serial dataYou may want to read [this article](http://www.paintyourdragon.com/?p=43) for more information and more pinouts.It should work on Raspberry PI.## Basic usage**Note:** more detailed usage and documentation coming soon.Load the `i2c-dev` kernel module.```sudo modprobe i2c-dev```Install `i2c-tools` to get the `i2cdetect` program, useful to scan for I2C devices.```sudo apt-get install i2c-tools```List the I2C buses```sudo i2cdetect -l```Connect the device to the I2C pins, then scan every bus until you find the device. Device should have address 0x39.```sudo i2cdetect -y <bus number># Sample good output0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f00:          -- -- -- -- -- -- -- -- -- -- -- -- --10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --30: -- -- -- -- -- -- -- -- -- 39 -- -- -- -- -- --40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --70: -- -- -- -- -- -- -- --```Once you have found the correct bus, run Python as root and import the module.```sudo python>>> from apds9930 import APDS9930```Open the bus```>>> a = APDS9930(bus_number)```That's it! Use Python's help function to retrieve the documentation (which is yet to be generated).```>>> help(APDS9930)```
Package: python_api_client
python-api-client=========================Python client to connect to REST based apiThis is still in its early stages and needs more tests and functionality for PUT, POST, PATCH and DELETE methodsTo run the tests----------------pip install -r test_requirements.txtpython tests.pyUsage-----If you are using Django put the following in to your settings file:```pythonBASE_API_URL = "http://yourdomain.com/api/v2/"```If you are not using Django create a file called settings.py in your project and add the line to that.Models:```pythonfrom python_api_client.models import Modelclass MyModel(Model):"""This assumes a url of http://yourdomain.com/api/v2/mymodels/...if this is not the case you can override@classmethoddef url(cls):return 'whatever url you want'"""pass```Views:```pythonfrom .models import MyModelmy_models = MyModel.objects.all()some_of_my_models = MyModel.objects.filter(something='s)my_model = MyModel.objects.get(pk=2)my_model.field = 'changed'my_model.save()```
Package: python-api-instagram
Class for usehttps://instagram.comInstallpipinstallpython-api-instagramExamplefrompython_api_instagram.instagramAPIimportinstagramAPIaccess_token='3403089465.260c1aa.b09a16*03c24435880d3fe195*f8f156'instagram=instagramAPI(access_token)printinstagram.users_self()printinstagram.users_detail(3403089465)printinstagram.users_self_media_liked()printinstagram.followed_by()printinstagram.follows_self()printinstagram.media_self_recent()printinstagram.media('1306717096452924663_3403089465')printinstagram.actions_relationship(3403089465,'follow')printinstagram.relationship(3403089465)printinstagram.requested_by()printinstagram.followed_by()printinstagram.follows()printinstagram.locations(514276)printinstagram.locations_media_recent(514276)printinstagram.locations_search(37.77493,-122.419415)LicenseMIT
Package: python-api-machine
python-api-machineCreate APIs by combining models and state machinesFree software: MIT licenseDocumentation:https://python-api-machine.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2021-07-14)First release on PyPI.
Package: python-apimatic-calculator
Getting Started with APIMATIC CalculatorIntroductionSimple calculator API hosted on APIMATICInstall the PackageThe package is compatible with Python versions3 >=3.7, <= 3.11.
Install the package from PyPi using the following pip command:pipinstallmyUniquePythonPackageName==1.0.899You can also view the package at:https://pypi.python.org/pypi/myUniquePythonPackageName/1.0.899Test the SDKYou can test the generated SDK and the server with test cases.unittestis used as the testing framework andpytestis used as the test runner. You can run the tests as follows:Navigate to the root directory of the SDK and run the following commandspip install -r test-requirements.txt
pytestInitialize the API ClientNote:Documentation for the client can be foundhere.The following parameters are configurable for the API Client:ParameterTypeDescriptionenvironmentEnvironmentThe API environment.Default:Environment.PRODUCTIONhttp_client_instanceHttpClientThe Http Client passed from the sdk user for making requestsoverride_http_client_configurationboolThe value which determines to override properties of the passed Http Client from the sdk userhttp_call_backHttpCallBackThe callback value that is invoked before and after an HTTP call is made to an endpointtimeoutfloatThe value to use for connection timeout.Default: 60max_retriesintThe number of times to retry an endpoint call if it fails.Default: 0backoff_factorfloatA backoff factor to apply between attempts after the second try.Default: 2retry_statusesArray of intThe http statuses on which retry is to be done.Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]retry_methodsArray of stringThe http methods on which retry is to be done.Default: ['GET', 'PUT']The API client can be initialized as follows:fromapimaticcalculator.apimaticcalculator_clientimportApimaticcalculatorClientfromapimaticcalculator.configurationimportEnvironmentclient=ApimaticcalculatorClient()List of APIsSimple CalculatorClasses DocumentationUtility ClassesHttpResponseHttpRequest
Package: pythonapm
NextAPMMonitor the Django and Flask python web application. You needhttps://nextapm.devaccount to configure the monitor.InstallationInstall agent module in your applicationpip install pythonapmInstrumentationTo monitor Django application, modify the settings.pyadd "pythonapm.contrib.django" in the first of INSTALLED_APPS in django settings.pyTo monitor Flask application, import following module in flask main file// this should be in the first line of application main file
import pythonapm;ConfigurationConfigure the following environment variables, you can get it fromhttps://app.nextapm.devafter creating monitor.NEXTAPM_LICENSE_KEY
NEXTAPM_PROJECT_IDRestart/RedeployRestart/Redeploy your application and perform transactions
Package: python-apollo
简介基于apollo-client，修改的 Apollo 客户端。使用示例安装pipinstall-Upython-apollo使用示例fromapollo.clientimportApolloClient# 获取 ApolloClient 实例apollo=ApolloClient(app_id='xxx',config_server_url='http://127.0.0.1:8090',cycle_time=30)# 从指定的 namespace 中获取 host 的值。apollo.get_value("host",namespace='application')# 从指定的 namespace 中获取 host 的值, 如果没有则去公共 namespace 中获取。如果都存在则私有的优先级高于公共的。apollo.get_value("host",namespace='application',public_namespace=["common.smtp"])# 获取指定 namespace 下的所有配置值apollo.get_values(namespace='application')# 获取指定 namespace 和 public_namespace 下的所有配置值。如果都存在则私有的优先级高于公共的。apollo.get_values(namespace='application',public_namespace=["common.smtp"])
Package: python-apollo-client
python-apollo-clientPython连接Apollo配置中心基于https://github.com/BruceWW/pyapollo修改站在巨人的肩膀上感谢原作者工程主页https://pypi.org/project/python-apollo-client/https://github.com/yjlch1016/python-apollo-client安装pipinstallpython-apollo-client用法启动客户端长连接监听client=ApolloClient(username=<username>,password=<password>,app_id=<appId>,cluster=<clusterName>,config_server_url=<configServerUrl>)client.start()获取Apollo的配置client.get_value(Key,DefaultValue)参考https://github.com/ctripcorp/apollohttps://github.com/filamoon/pyapollohttps://github.com/BruceWW/pyapollo
Package: python-app
REST API using Flask and Python [Air connections search]Project consist of:images - folder with images sourcestests - folder with UnitTests, Pytestapp.py - main application resourcedb.py - resource for creation and for fill the databaserequirements.txt - file for install packageslist.csv - list of flights for databasepytest.ini - pytest fileconfig.cfg - file with config, flake8For using application you need to do:Install Python 3.6 or higherInstall requirementspip install -r requirements.txtCreate database for applicationpython db.py$ python db.py

20 Record TransferredThere are 3 environments to choose from with different databases, choose one:testing - for local testing,dev - need to be configured manuallyprod - need to be configured manuallyRun applicationpython app.py testing$ python app.py
 * Serving Flask app "app" (lazy loading)
 * Environment: production
 * Debug mode: on
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 231-078-686
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)Follow the linkhttp://127.0.0.1:5000/EndpointsEndpointRequestDescription/flightGETGet All Flights/flight/idGETGet Single Flight/flightPOSTCreate a Flight/flight/idPUTUpdate a Flight/flight/idDELETEDelete Flight/flight/searchGETFlight search between 2 citiesStart Using:1. Get All Flightscurl-XGEThttp://127.0.0.1:5000/flight2. Get Single Flightcurl-XGEThttp://127.0.0.1:5000/flight/103. Create a Flightcurl-XPOST-H"Content-Type: application/json"-d'{"source": "Barcelona", "destination": "Palma de Mallorca", "flight_company": "Vueling", "flight_number": "FR3745", "flight_time": "55m", "free_seats": "5", "price": "50$"}'http://127.0.0.1:5000/flight4. Update a Flightcurl-XPUT-H"Content-Type: application/json"-d'{"source": "Barcelona", "destination": "Palma de Mallorca", "flight_company": "Ryanair", "flight_number": "FR3785", "flight_time": "50m", "free_seats": "8", "price": "150$"}'http://127.0.0.1:5000/flight/115. Delete Flightcurl-XDELETEhttp://127.0.0.1:5000/flight/116. Flight search between 2 citieshttp://127.0.0.1:5000/flight/search?c1=Milan&c2=BarcelonaUnitTests:Download the project:Follow thelinkChoose branche (feature/jdobc-255)- Using LinterInstall packagespip install flake8Run flake8flake8$ flake8
0- Using PyTestInstall pytest from pippip install pytestRun pytestpytest -v- Coverage by PyTest:Install packagespip install pytest-covRun commandpytest --cov=. --cov-config='.coveragerc' -c='pytest.ini'GitLab CI Multi-project:Flake8PytestCoverageBuild artifactUpload artifact to s3Deploy terraform codeLogging for AWS CloudWatchHow to run the application locally in the test environment ?run applicatin:python app.py testingLog output file "air-connection-app.log" will be created automaticallyÐ¢Ð¾ see the streaming of application logs in AWS you need to deploy the application in AWS usingterraform templateand go toCloudWatch logs
Package: python-appengine-auth
Remote Google App Engine OAuth backend for Django=================================================[Python-AppEngine-Auth](https://github.com/mback2k/python-appengine-auth) is anextension to [Python-Social-Auth](https://github.com/omab/python-social-auth)which adds a OAuth backend for Google App Engine based Google Accounts.This application makes use of the[Google App Engine OAuth Profile endpoint application](https://github.com/mback2k/appengine-oauth-profile)which is by default hosted at https://oauth-profile.appspot.com/Dependencies------------- python-social-auth [https://github.com/omab/python-social-auth]- oauthlib           [https://github.com/idan/oauthlib/]Installation------------Install the latest version from pypi.python.org:pip install python-appengine-authInstall the development version by cloning the source from github.com:pip install git+https://github.com/mback2k/python-appengine-auth.gitConfiguration-------------Add the package to your `INSTALLED_APPS`:INSTALLED_APPS += ('social.apps.django_app.default','social_appengine_auth',)Add the desired backends to your `AUTHENTICATION BACKENDS`:AUTHENTICATION_BACKENDS += ('social_appengine_auth.backends.GoogleAppEngineOAuth','social_appengine_auth.backends.GoogleAppEngineOAuth2',)Add the pipeline to your `SOCIAL_AUTH_PIPELINE`:SOCIAL_AUTH_PIPELINE = ('social.pipeline.social_auth.social_details','social.pipeline.social_auth.social_uid','social.pipeline.social_auth.auth_allowed','social.pipeline.social_auth.social_user','social.pipeline.user.get_username',# Add the following custom pipeline:'social_appengine_auth.pipelines.associate_by_user_id',# 'social.pipeline.mail.mail_validation',# 'social.pipeline.social_auth.associate_by_email','social.pipeline.user.create_user','social.pipeline.social_auth.associate_user','social.pipeline.social_auth.load_extra_data','social.pipeline.user.user_details',)Additional Settings-------------------Add some or all of the following settings to your `settings.py`:# Hostname of the OAuth and Web Service endpointSOCIAL_AUTH_GOOGLE_APPENGINE_OAUTH_SERVER = 'oauth-profile.appspot.com'# Use static and unique Google App Engine user's user_id as identifier# Defaults to False which makes it use the user's email addressGOOGLE_APPENGINE_OAUTH_USE_UNIQUE_USER_ID = True# Setup Google OAuth 1.0 consumer key and secretSOCIAL_AUTH_GOOGLE_APPENGINE_OAUTH_KEY = ''SOCIAL_AUTH_GOOGLE_APPENGINE_OAUTH_KEY = ''# or Setup Google OAuth 2.0 client id and secretSOCIAL_AUTH_GOOGLE_APPENGINE_OAUTH2_KEY = ''SOCIAL_AUTH_GOOGLE_APPENGINE_OAUTH2_SECRET = ''Please refer to the [Python-Social-Auth](http://psa.matiasaguirre.net/)documentation for additional information.License-------* Released under MIT License* Copyright (c) 2012-2015 Marc Hoersken <info@marc-hoersken.de>
Package: python-appimage
AppImage distributions of PythonReady to use AppImages of Python are available as GitHubreleases.QuickstartWe provide relocatable Python runtimes asAppImagesfor Linux
systems. These runtimes are extracted fromManylinuxDocker images,
and they are available as GitHubreleases.  Our Python AppImages are
updated weekly, on every Sunday.Instructions forinstallingand runningPython AppImagesare provided onRead the Docs.In addition, the online documentation describes thepython-appimageutility, for application developers. This utility can facilitate the building of
Python apps, given an existing Python AppImage and a recipe folder.Examplesof recipes are available from GitHub.Projects usingpython-appimagegrand/python- Contained, portable
and modern python forGRANDrunning from an AppImagerever- Cross-platform software release tool.ssh-mitm- ssh mitm server for security auditsxonsh- Python-powered, cross-platform, Unix-gazing
shell language and command promptxxh- Bring your favorite shell wherever you go
through the sshLicenseThepython-appimagepackage (A) is under the GNU GPLv3 license,
except for files located underpython_appimage/datawhich are MIT licensed.
Thus, the produced Manylinux Python AppImages (B) are not GPL'd. They
contain a CPython distribution that is (mostly) under thePSF
license. Other parts ofB(e.g.AppRun) are under the MIT
license.
Package: python-application
This package is a collection of modules that are useful when building python
applications. Their purpose is to eliminate the need to divert resources into
implementing the small tasks that every application needs to do in order to
run successfully and focus instead on the application logic itself.The modules that the application package provides are:process       - UNIX process and signal management.python        - python utility classes and functions.configuration - a simple interface to handle configuration files.log           - an extensible system logger for console and syslog.debug         - memory troubleshooting and execution timing.system        - interaction with the underlying operating system.notification  - an application wide notification system.version       - manage version numbers for applications and packages.
Package: python-app-loader
Load configs from python modules especially Django applications. Plays well with Django application/modules. You can simply define your specification and then just load your modules which tells you what needs. It’s universal and easy to use.InstallationUsageRead MoreInstallationpipinstallpython-app-loaderUsageYour settings.pyfromapp_loaderimportapp_loaderAPPS=['testapp']# load directly specified appsapp_loader.get_app_modules(APPS)# load all modulesapp_loader.load_modules()# just propagate all loaded modules to settingsINSTALLED_APPS=app_loader.config.apps# override alltry:fromlocal_settingsimport*exceptImportError:passYou can inicialize your AppLoader:loader = AppLoader(autoload=False)

loader.get_app_modules(APPS)

print(loader.config.apps)or you can create your own AppLoader:class MyAppLoader(AppLoader):

    CONFIG_MASTER_OBJECT_CLASS = 'mymodule.MyMasterClass'For advance example check django-leonardo which uses this module for loading configurations from all modules. (about 60+ modules) which could be auto loaded without any requirements.Read Morehttps://github.com/django-leonardo/django-leonardo
Package: python-app-store-scraper
QuickstartInstall:pip3 install python-app-store-scraperScrape reviews for an app:fromapp_store_scraperimportAppStorefrompprintimportpprintfacebook=AppStore(country="us",app_name="facebook")facebook.review(how_many=20)pprint(facebook.reviews)pprint(facebook.reviews_count)Scrape reviews for a podcast:fromapp_store_scraperimportPodcastfrompprintimportpprintsysk=Podcast(country="us",app_name="stuff you should know")sysk.review(how_many=20)pprint(sysk.reviews)pprint(sysk.reviews_count)InstantiationThere are two required and one positional parameters:country(required)two-letter country code ofISO 3166-1 alpha-2standardapp_name(required)name of an iOS application to fetch reviews foralso used bysearch_id()method to search forapp_idinternallyapp_id(positional)can be passed directlyor ignored to be obtained bysearch_idmethod internallyOnce instantiated, the object can be examined:>>>facebookAppStore(country='us', app_name='facebook', app_id=284882215)>>>print(app)Country | usName | facebookID | 284882215URL | https://apps.apple.com/us/app/facebook/id284882215Review count | 0Other optional parameters are:log_formatpassed directly tologging.basicConfig(format=log_format)default is"%(asctime)s [%(levelname)s] %(name)s - %(message)s"log_levelpassed directly tologging.basicConfig(level=log_level)default is"INFO"log_intervallog is produced every 5 seconds (by default) as a "heartbeat" (useful for a long scraping session)default is5Fetching ReviewThe maximum number of reviews fetched per request is 20. To minimise the number of calls, the limit of 20 is hardcoded. This means thereview()method will always grab more than thehow_manyargument supplied with an increment of 20.>>>facebook.review(how_many=33)>>>facebook.reviews_count40Ifhow_manyis not provided,review()will terminate afterallreviews are fetched.NOTEthe review count seen on the landing page differs from the actual number of reviews fetched. This is simply because onlysomeusers who rated the app also leave reviews.Optional Parametersafteradatetimeobject to filter older reviewssleepanintto specify seconds to sleep between each callReview DataThe fetched review data are loaded in memory and live insidereviewsattribute as a list of dict.>>>facebook.reviews[{'userName': 'someone', 'rating': 5, 'date': datetime.datetime(...Each review dictionary has the following schema:{"date":datetime.datetime,"isEdited":bool,"rating":int,"review":str,"title":str,"userName":str}
Package: python-appstream
# python-appstreamIf you want to parse AppStream files in Python you probably should
just install libappstream-glib, and use the GObjectIntrospection bindings
for that. AppStreamGlib is a much better library than this and handles
many more kinds of component.If AppStreamGlib is not available to you (e.g. you’re trying to run in an
OpenShift instance on RHEL 6.2), this project might be somewhat useful.Contributors welcome, either adding new functionality or fixing bugs.See also:http://www.freedesktop.org/software/appstream/docs/
Package: python-aprmd5
python-aprmd5 is a Python extension written in C that wraps the MD5 routines of
the Apache Portable Runtime (APR) Utility Library (libaprutil) and exposes them
to the Python interpreter as the module aprmd5. The main purpose of writing
python-aprmd5 in the first place has been to expose the function
apr_md5_encode(), which generates salted crypt-style hashes using a version of
the MD5 hash algorithm that was modified especially for the APR project.The resulting hashes always start with the prefix characters “$apr1$” in order
to distinguish them from the result of various other crypt() variants, which
use other prefixes. For instance, for input “foo” and salt “mYJd83wW”,
apr_md5_encode() produces the following hash:$apr1$mYJd83wW$IO.6aK3G0d4mHxcImhPX50Hashes like this are typically generated by the command line utility htpasswd,
which is part of the Apache HTTP server project. The hashes encrypt user
passwords that are used by the Apache HTTP server for basic user authentication.For completeness sake, python-aprmd5 exposes not only apr_md5_encode() but most
of the other functions of libaprutil’s MD5 routines as well. Where those
functions are concerned with the original, unmodified MD5 algorithm, this is
mostly a duplication of effort as that algorithm can be easily obtained through
the Python Standard Library module “hashlib”. In fact I advise against using
python-aprmd5 if you are interested in the original MD5 algorithm only.