Saravanan666/pypi-org huggingface dataset:
Package: restible-appengine
restible-appenginethat allows you to userestiblein AppEngine standard python
environment. It includes a base resource classNdbResourcethat works as a
glue betweenrestibleand Datastore.It also includes webapp2 integration for the secure scaffold (properly
integrates Google’s base endpoint classes intorestible.NoteThe CircleCI builds can be foundhereInstallation$pipinstallrestible-appengineContributingCloning and setting up the development repo$gitclonegit@github.com:novopl/restible-appengine.git$cdrestible$virtualenvenv$source./env/bin/activate$pipinstall.$pipinstall-rops/devrequirements.txt$peltakgitadd-hooksNoteGod knows why, installing the current package withpython setup.py developorpython setup.py installwill cause pylint
to thinksixis a local project package and it will throw errors about
the wrong import order.Running tests$peltaktestLinting$peltaklintGenerating docs$peltakdocs
Package: restible-django
restible-djangois a library that providesdjangointegration withrestible. It includes the base resource
classDjangoResourcethat can be used to define REST resources based on
django model definitions along withDjangoEndpointclass that integratesrestiblewith django routing.NoteThe CircleCI builds can be foundhereInstallation$pipinstallrestible-djangoContributingSetting up development repo$gitclonegit@github.com:novopl/restible-django.git$cdrestible-django$virtualenvenv$source./env/bin/activate# python setup.py develop$pipinstall-rops/devrequirements.txt$peltakgitadd-hooksRunning testsConfig: The types of tests are defined inpelconf.pyand the
pytest configuration is defined inops/tools/pytest.ini.$peltaktestLintingConfig: The list of locations to lint is defined inpelconf.pyand the
linters configuration is defined inops/tools/{pylint,pep8}.ini.$peltaklintGenerating docsConfig: The list of documented files and general configuration is inpelconf.pyand the Sphinx configuration is defined indocs/conf.py.$peltakdocs
Package: restible-flask
restible-flaskis a library that providesFlaskintegration withrestible. It provides the base endpoint
classFlaskEndpointthat that integratesrestiblewith Flask routing.NoteThe CircleCI builds can be foundhereInstallation$pipinstallrestible-flaskContributingSetting up development repo$gitclonegit@github.com:novopl/restible-flask.git$cdrestible-flask$virtualenvenv$source./env/bin/activate$pythonsetup.pydevelop$pipinstall-rops/devrequirements.txt$peltakgitadd-hooksRunning testsConfig: The types of tests are defined inpelconf.pyand the
pytest configuration is defined inops/tools/pytest.ini.$peltaktestLintingConfig: The list of locations to lint is defined inpelconf.pyand the
linters configuration is defined inops/tools/{pylint,pep8}.ini.$peltaklintGenerating docsConfig: The list of documented files and general configuration is inpelconf.pyand the Sphinx configuration is defined indocs/conf.py.$peltakdocs
Package: restible-sqlalchemy
restible-sqlalchemyis a library that providesdjangointegration withrestible. It includes the base resource
classSqlAlchemyResourcethat can be used to define REST resources based on
SQLAlchemy model definitions.NoteThe CircleCI builds can be foundhereInstallation$pipinstallrestible-sqlalchemyContributingSetting up development repo$gitclonegit@github.com:novopl/restible-sqlalchemy.git$cdrestible-sqlalchemy$virtualenvenv$source./env/bin/activate$pipinstall-rrequirements.txt-rops/devrequirements.txt$peltakgitadd-hooksRunning testsConfig: The types of tests are defined inpelconf.pyand the
pytest configuration is defined inops/tools/pytest.ini.$peltaktestLintingConfig: The list of locations to lint is defined inpelconf.pyand the
linters configuration is defined inops/tools/{pylint,pep8}.ini.$peltaklintGenerating docsConfig: The list of documented files and general configuration is inpelconf.pyand the Sphinx configuration is defined indocs/conf.py.$peltakdocs
Package: restible-swagger
This is simple tool that makes it easy to generate OpenAPI (previously Swagger)
specification from therestiblepowered
backend code.NoteThe CircleCI builds can be foundhereInstallation$pipinstallrestible-appengineContributingCloning and setting up the development repo$gitclonegit@github.com:novopl/restible-swagger.git$cdrestible-swagger$virtualenvenv$source./env/bin/activate$pipinstall.$pipinstall-rops/devrequirements.txt$peltakgitadd-hooksNoteGod knows why, installing the current package withpython setup.py developorpython setup.py installwill cause pylint
to thinksixis a local project package and it will throw errors about
the wrong import order.Running tests$peltaktestLinting$peltaklintGenerating docs$peltakdocs
Package: restic-exporter
Restic ExporterA small Python binary to export stats from aresticbackup repository, for example for use in monitoring systems.Installation$pip3installrestic-exporterFeaturesDecoupled fromresticitself, can be run on any
host as long as it can talk to the repository.Can provide both repo-based statistics, and backup progress statistics from restic clients.Statistics ExportedAlmost all data made available from the restic tool itself can be exported.Backup progress (restic_backup_progress)hostnamepathstagsbytes_donetotal_bytesfiles_donetotal_filespercent_doneseconds_tagBackup summary  (restic_backup_summary)hostnamepathstagssnapshot_idfiles_newfiles_unmodifiedfiles_changeddirs_newdirs_unmodifieddirs_changeddata_addedtotal_bytes_processedtotal_files_processedtotal_durationSnapshots  (restic_snapshots)hostnamepathstagsraw_blob_countraw_file_countraw_sizerestore_file_countrestore_sizeSupported ExportersThis tool can export statistics to:InfluxDBUsageTo be completed.
Package: resticpy
resticpyOverviewMinimal Python wrapper around theresticbackup command-line interface.InstallationFrom pippipinstallresticpyFrom sourcegitclonehttps://github.com/mtlynch/resticpy.gitcdresticpy
pipinstall.Quick startCreate a password fileprintf"mysecretpass">password.txtInitialize a repository and back up a fileimportresticrestic.repository='/tmp/backup1'restic.password_file='password.txt'restic.init()restic.backup(paths=['some-file.txt'])Restore a snapshotimportresticrestic.repository='/tmp/backup1'restic.password_file='password.txt'restic.restore(snapshot_id='latest',target_dir='~/restored')API Documentationhttps://mtlynch.github.io/resticpy/ExampleI personally use this library for my backups. I've published my backup script atmtlynch/mtlynch-backup.Compatibilityresticpy is tested againstrestic 0.16.0.resticpy's scope and futureresticpy is maintained byMichael Lynchas a hobby project.resticpy isnotmeant to achieve feature parity with restic. It is meant to cover a small subset of the most useful features of restic.Due to time limitations, I keep resticpy's scope limited to only the features that fit into my workflows.Feature requestsI don't fulfill feature requests for resticpy. You are welcome to file a feature request for a third-party contributor to take on.Pull requestsI accept pull requests when they are:DocumentedTestedSmallI don't accept pull requests for features that look like they'll be a large maintenance burden.AcknowledgmentsThis project is forked fromjstzwj/PyRestic.
Package: restifier
Restifier is a python library for creating and documenting RESTful
APIs.It includes a middleware component, a set of decorators, and a “forms”
library for validating/documenting requests. The middle generates a
Swagger compatible JSON specification for the APIs automatically.AuthorJesse Lovelacejesse@hawatian.comLicenseThe MIT LicenseUsageSee tests.py for information on usage. In general, so create a payload
validator construct a class like this:classHelloMessage(Message):greeting=StringProperty(description="The greating.",validators=[regex(re.compile('^[A-Za-z]+$')),required()])classHelloResponseMessage(Message):salutation=StringProperty(description="The response.")tags=StringProperty(repeated=True)request=StructuredProperty(HelloMessage)Then decorate your handlers like this:classHelloHandler(RequestHandler):@api(input=HelloMessage,output=HelloResponseMessage)defpost(self,obj):return{'salutation':'You are the best.'}Also, to auto-document, use the middleware:routes=[('/api/v1/hello',HelloHandler)]app=DocumentedMiddleware(WSGIApplication(routes),api_base="/api/v1",api_overview="This is a super important API that does a lot of stuff.")
Package: restify-ENGYAK
Python REST ToolSynopsisProvide a python tool to quickly invoke REST calls with a pre-defined list of settings, plays.How to use this toolDownload the package:python3-mpipinstallrestify-ENGYAKSet Environment Variables.APIUSERandAPIPASSare mandatory.exportAPIUSER=usernameexportAPIPASS=passwordexportAPIENDPOINT={{APIFullURL}}Invoke via the CLI:python3-mrestify-fsettings.jsonlist_playsTo build a new settings file:python3-mrestifycreate_settings>settings.jsonTo list plays provided by a settings file:python3-mrestify-fsettings.jsonlist_playsAPI InvocationOnce the package is installed, thenamshub()API can be used by:# Import Restify Libraryfromrestify.RuminatingCogitationimportSettingsfromrestify.RuminatingCogitationimportReliquary# Set the interface - apply from variables no matter whatcogitation_interface=Reliquary(args.f,input_user=api_user,input_pass=api_pass)# Exposed variables: def namshub(self, namshub_string, namshub_variables=False, namshub_dryrun=False):cogitation_interface.namshub({{}},namshub_variables={{}})And then process data from there.namshubcurrently exports text from the API, and may support adictin the future.NotesAuthorsNick Schmidt
Package: restinmagento
Restinmagento is a client library for the Magento REST API.It aims to provide a pythonic way to interact with magento REST resources through:a straight forward low level API exposing standard HTTP methods on resources.a higher level object oriented API (ORM or object database style)some command line tools to help obtaining acces tokens from a Magento server.Restinmagento usessemantic versioning. As a consequence the API should be considered unstable as long as version 1.0 is not reached. That being said, the API is already pretty stable and tested, so give it a shot !DocumentationDocumentation is available here:http://jmsinfor.com/projects/restinmagento/.LicenseRestinmagento is offered under theMIT Licence.SponsorRestinmagento is heavily sponsored byJMS Informatique.
Package: restio
restioIntroductionWhen consuming remote REST APIs, the workflow done on the Business Logic Layer (BLL) of an application differentiates from that done in relational databases. On backend multi-tiered applications, it is common to use transactions to guarantee atomicity when persisting data on these databases. For remote APIs, however, this becomes a more cumbersome job, as the application has no control or knowledge of when things will go wrong on the remote server. Adding to that, each interaction with the remote server can be an expensive operation, which makes the management of the remote requests a challenge on the BLL.In order to tackle this and other issues, therestioframework has been created to facilitate the evolution and maintenance of Python applications that access one or several REST APIs at the same time.This framework relies on a few building blocks that build on top of already existing REST Client libraries. You can read more about themhere.InstallationRequirementsPython 3.7+PipYou can installrestioas a dependency to your project with pip:pipinstallrestio
Package: restit
Python HTTP REST library including OOP-readiness and Open-API generationFor a more comprehensive documentation see:https://restit.readthedocs.io/en/latest/FeaturesWSGIconformValidation (usingmarshmallow)query parameter validationpath parameter validationrequest body validationresponse body validationOpenApidocumentation generationOOP-ready (no module-based global instances necessary)Easy hyperlink generationException mappingResponse serialization customizationRequest deserialization customizationEasy to testQuick examplefromrestitimportRequest,Resource,Response,RestItAppfromrestit.decoratorimportpath@path("/")classIndexResource(Resource):defget(self,request:Request)->Response:returnResponse("Hello from index.")app=RestItApp(resources=[IndexResource()])if__name__=="__main__":# start a development server on http://127.0.0.1:5000app.start_development_server()You can also use a production-ready server likeGunicorn(given the name of the above module isrestit_app_test.py):gunicorn-w4restit_app_test:app
Package: restkiss
DEPRECATED.We’re now part of therestlessteam, so development will continue there.restkissA fork of therestlesslightweight REST miniframework for Python.Documentation is athttp://restkiss.readthedocs.io/.Works great withDjango,Flask,Pyramid,Tornado&Itty, but should be useful for
many other Python web frameworks. Based on the lessons learned fromTastypie& other REST libraries.FeaturesSmall, fast codebaseJSON output by default, but overridableRESTfulPython 3.2+ (with shims to make broke-ass Python 2.6+ work)FlexibleAnti-FeaturesThings that will never be added to the core library - but plugins are encouraged!Automatic ORM integrationAuthorization (per-object or not)Extensive filtering optionsXML outputMetaclassesMixinsHATEOASWhy?Creator@toastdrivenhad a very specific goal when building the originalrestless, and our goal is to respect it. Here it follows:> Quite simply, I care about creating flexible & RESTful APIs. In building
> Tastypie, I tried to create something extremely complete & comprehensive.
> The result was writing a lot of hook methods (for easy extensibility) & a lot
> of (perceived) bloat, as I tried to accommodate for everything people might
> want/need in a flexible/overridable manner.
>
> But in reality, all I really ever personally want are the RESTful verbs, JSON
> serialization & the ability of override behavior.
>
> This one is written for me, but maybe it’s useful to you.ManifestoRather than try to build something that automatically does the typically
correct thing within each of the views, it’s up to you to implement the bodies
of various HTTP methods.Example code:# posts/api.pyfromdjango.contrib.auth.modelsimportUserfromrestkiss.djimportDjangoResourcefromrestkiss.preparersimportFieldsPreparerfromposts.modelsimportPostclassPostResource(DjangoResource):# Controls what data is included in the serialized output.preparer=FieldsPreparer(fields={'id':'id','title':'title','author':'user.username','body':'content','posted_on':'posted_on',})# GET /deflist(self):returnPost.objects.all()# GET /pk/defdetail(self,pk):returnPost.objects.get(id=pk)# POST /defcreate(self):returnPost.objects.create(title=self.data['title'],user=User.objects.get(username=self.data['author']),content=self.data['body'])# PUT /pk/defupdate(self,pk):try:post=Post.objects.get(id=pk)exceptPost.DoesNotExist:post=Post()post.title=self.data['title']post.user=User.objects.get(username=self.data['author'])post.content=self.data['body']post.save()returnpost# DELETE /pk/defdelete(self,pk):Post.objects.get(id=pk).delete()Hooking it up:# api/urls.pyfromdjango.conf.urls.defaultimporturl,includefromposts.apiimportPostResourceurlpatterns=[# The usual suspects, then...url(r'^api/posts/',include(PostResource.urls())),]LicenceBSDRunning the TestsThe test suite usestoxfor simultaneous support of multiple versions of both
Python and Django. The current versions of Python supported are:CPython 2.7CPython 3.4CPython 3.5PyPy (Python 2.7)PyPy3 (Python 3.2)PyPy3 beta (Python 3.3)You just need to install the Python interpreters above and thetoxpackage
(available viapip), then run thetoxcommand.
Package: restkit
AboutRestkit is an HTTP resource kit forPython. It allows
you to easily access to HTTP resource and build objects around it. It’s the
base ofcouchdbkita PythonCouchDBframework.Restkit is a full HTTP client using pure socket calls and its own HTTP parser.
It’s not based on httplib or urllib2.FeaturesFull compatible HTTP client for HTTP 1.0 and 1.1ThreadsafeUse pure socket calls and its own HTTP parser (It’s not based on httplib or urllib2)Map HTTP resources to Python objectsReadandSendon the flyReuses connectionsEventletandGeventsupportSupportChunked transfer encodingin both ways.SupportBasic AuthentificationandOAuth.Multipart forms and url-encoded formsStreaming supportProxy handlingHTTP Filters, you can hook requests in responses with your own callbackCompatible with Python 2.x (>= 2.6)Documentationhttp://restkit.readthedocs.orgInstallationrestkit requires Python 2.x superior to 2.6 (Python 3 support is coming soon)To install restkit using pip you must make sure you have a
recent version of distribute installed:$ curl -O http://python-distribute.org/distribute_setup.py
$ sudo python distribute_setup.py
$ easy_install pipTo install from source, run the following command:$ git clone https://github.com/benoitc/restkit.git
$ cd restkit
$ pip install -r requirements.txt
$ python setup.py installFrom pypi:$ pip install restkitLicenserestkit is available under the MIT license.
Package: restler-serialization
Restler is an object Serialization library for the web. It supports
translating objects to JSON or XML. Currently, it is targeted at
Google App Engine with python 2.7.InstallationInstall Restler from PyPi using easy_install or pip; or download the
package and run:python setup.py install(Runningsetup.pyrequires setuptools.)For use on Google App Engine, you will need to install the code in therestlerdirectory somewhere in your path.Running TestsTo run restler’s tests:pip install -r requirements.txt -t lib
python -m unittest discoverRunning tests requires python 2.7 the Google App Engine SDK or Google Cloud SDKUsageA db.Model or ndb.Model instance can be serialized with the default settings usingto_jsonorto_xml.>>> jean = Person(first_name="Jeanne", last_name="d'Arc", ssn="N/A")
>>> to_json(jean)
'{"first_name": "Jeanne", "last_name": "d\'Arc", "ssn": "N/A"}'To include only certain fields, use aModelStrategy.
When using aModelStrategy, you will need to use a restler model decorator.>>> @ae_db_serializer
>>> class User(db.Model)
>>>    ...Now setup theModelStrategy>>> person_strategy = ModelStrategy(Person).include("first_name", "last_name")
>>> to_json(jean, person_strategy)
'{"first_name": "Jeanne", "last_name": "d'Arc"}'Or, to exclude specified fields:>>> person_strategy = ModelStrategy(Person, include_all_fields=True).exclude("ssn")
>>> to_json(jean, person_strategy)
'{"first_name": "Jeanne", "last_name": "d'Arc"}'For more details on customizing serialization, see the documentation.TODOhttps://bitbucket.org/curtis/restler/issues?status=new&status=open
Package: restless
A lightweight REST miniframework for Python.Documentation is athttps://restless.readthedocs.io/.Works great withDjango,Flask,Pyramid,Tornado&Itty, but should be useful for
many other Python web frameworks. Based on the lessons learned fromTastypie& other REST libraries.FeaturesSmall, fast codebaseJSON output by default, but overridableRESTfulPython 3.6+Django 2.2+FlexibleAnti-Features(Things that will never be added…)Automatic ORM integrationAuthorization (per-object or not)Extensive filtering optionsXML output (though you can implement your own)MetaclassesMixinsHATEOASWhy?Quite simply, I care about creating flexible & RESTFul APIs. In building
Tastypie, I tried to create something extremely complete & comprehensive.
The result was writing a lot of hook methods (for easy extensibility) & a lot
of (perceived) bloat, as I tried to accommodate for everything people might
want/need in a flexible/overridable manner.But in reality, all I really ever personally want are the RESTful verbs, JSON
serialization & the ability of override behavior.This one is written for me, but maybe it’s useful to you.ManifestoRather than try to build something that automatically does the typically
correct thing within each of the views, it’s up to you to implement the bodies
of various HTTP methods.Example code:# posts/api.pyfromdjango.contrib.auth.modelsimportUserfromrestless.djimportDjangoResourcefromrestless.preparersimportFieldsPreparerfromposts.modelsimportPostclassPostResource(DjangoResource):# Controls what data is included in the serialized output.preparer=FieldsPreparer(fields={'id':'id','title':'title','author':'user.username','body':'content','posted_on':'posted_on',})# GET /deflist(self):returnPost.objects.all()# GET /pk/defdetail(self,pk):returnPost.objects.get(id=pk)# POST /defcreate(self):returnPost.objects.create(title=self.data['title'],user=User.objects.get(username=self.data['author']),content=self.data['body'])# PUT /pk/defupdate(self,pk):try:post=Post.objects.get(id=pk)exceptPost.DoesNotExist:post=Post()post.title=self.data['title']post.user=User.objects.get(username=self.data['author'])post.content=self.data['body']post.save()returnpost# DELETE /pk/defdelete(self,pk):Post.objects.get(id=pk).delete()Hooking it up:# api/urls.pyfromdjango.conf.urls.defaultimporturl,includefromposts.apiimportPostResourceurlpatterns=[# The usual suspects, then...url(r'^api/posts/',include(PostResource.urls())),]LicenceBSDRunning the TestsThe test suite usestoxfor simultaneous support of multiple versions of both
Python and Django. The current versions of Python supported are:CPython 3.6CPython 3.7CPython 3.8CPython 3.9PyPyYou just need to install the Python interpreters above and thetoxpackage
(available viapip), then run thetoxcommand.
Package: restmagic
%%rest: HTTP REST magic for IPython.Intended to provide similar functionality asrestclient.el- HTTP REST client tool for Emacs.UsageIn[1]:%load_extrestmagicIn[2]:%%rest...:POSThttps://httpbin.org/post...:Content-Type:application/json...:Authorization:Bearer$mytoken...:...:{...:"some":"data",...:"array here":[...:"item 1",...:"item 2"...:]...:}Out[2]:<Response[200]>ExamplesSee notebooks:Usage exampleDjango login formGitHub APISending SMS with HiLink APIEthereum JSON RPCInstallationPackage can be installed from the PyPI by executing:pip install restmagicDevelopment version can be installed by executing:pip install git+https://github.com/b3b/ipython-restmagicPackage can be uninstalled by executing:pip uninstall restmagicRelated resourcesrestclient.el: HTTP REST client tool for EmacsMake Jupyter/IPython Notebook even more magical with cell magic extensions!: Nicolas Kruchten’s talk from the PyCon Canada 2015ipython-sql: was used as an example of IPython magicpython-requests: used for HTTP requestsrequests-toolbelt: used for HTTP sessions information dumpingjsonpath-rw: used to extract parts of JSON responseslxml: used to extract parts of XML/HTML responses
Package: rest-meets-djongo
rest-meets-djongoThis package enables default model serializers for models with Djongo
fields to be generated, for use in Django-Rest-Framework appsFeaturesNOTE: This repo is currently under active development, and many of the
features of the package may act in strange ways. Please report any issues
toGitLaborGitHubas you find themSimilar to DRF ModelSerializers, creating serializers using
DjongoModelSerializer allows for the following fields to be detected and
automatically managed through DRF's serializer setup. These fields
include:ObjectIDFieldEmbeddedFieldArrayFieldThe following are currently not fully functional, and as a result are
not explicitly supported (yet):ForeignKeyField (Reverse relations are not generated, even if specified,
by Djongo)ManyToManyField (Reverse relations are not generated, even if specified,
by Djongo)ArrayReferenceField (WIP)InstallationInstall rest-meets-djongo:pip install rest-meets-djongoReplace REST's 'ModelSerializer' with 'DjongoModelSerializer' and enjoy!Requirements(Alternate version testing is currently underway; these are just the
confirmed functional versions)Python 3.6 or higherMongoDB 4.0 or higherdjangorestframework 3.9 or higherdjongo 1.3 or higher (use version 0.11 for djongo 1.2 versions)