Saravanan666/pypi-org huggingface dataset:
Package: pyramid-mongodb2
Pyramid MongodbA simple library to integrate mongodb into your pyramid application. Comes with a debugtoolbar.FeaturesSupports multiple databasesConfiguration only setupIntegrated debugtoolbar with:Shows db response timesexplain()for cursor resultsConnection informationDatabase and collection statsAvoids recreating and closingMongoClienton every request.Setuppipinstallpyramid_mongodb2Add the following to your application's ini file, (includepyramid_mongodb2:MongoToolbarindebugtoolbar.includesif you want to debug):[app:main]mongo_uri=mongodb://username:password@mongodb.host.com:27017/authdbmongo_dbs=foobarbaz-quuxfoo-test=foopyramid.includes=pyramid_makopyramid_debugtoolbarpyramid_mongodb2debugtoolbar.includes=pyramid_mongodb2:MongoToolbarThe code will useconfig.add_request_method()to add aDatabaseobject to your requests, where each database is accessible bydb_database_name, as defined in your configuration.Note: database names with hyphens in them will be converted to underscores, that is databasebaz-quuxwill be accessible byrequest.db_baz_quux.When doingfoo-test = foo, the mongodb database with namefoo-testwill be assigned torequest.db_foo.
This helps when testing so that you can use a separate database for development, testing and production without
changing your application code, or if you just want to alias a database name.In your code where you can accessrequest, you now have the following variables:request.dbrequest.db_foorequest.db_barrequest.db_baz_quuxrequest.db_foorequest.dbis theMongoClientobject, should you ever need it.In your view code, you can do this:frompyramid.viewimportview_config@view_config(route_name='home',renderer="templates/landing.mako")defmy_view(request):return{'some_data':request.db_foo.some_collection.find({'a':{'$gte':5}},{'_id':False}),'other_data':request.db_bar.visitors.insert_one({'person':request.remote_addr}),}DebuggingWith debugging enabled, all queries will be logged inrequest.query_log, when the debugtoolbar is opened, you can
then view the execution time andexplain()of cursor results. You can also see connection settings and stats for
databases and collections.ScreenshotsHere's what the toolbar looks like in action:Clicking the database or collection name will  take you to the relevant section of the collections tab. Clicking the operation name will take you to its pymongo documentation.Clicking the explain button will show you theexplain()result for a cursor.You can view detailed connection information here, clicking the field name will take you to the pymongo documentation for that field.This page showdbstatsfor all connected databases used in this request and their collections.Here we can see the use of multiple databases in a single project.
Package: pyramid-mongoengine
# Pyramid Mongoenginepyramid-mongoengine package based in [flask-mongoengine](https://github.com/MongoEngine/flask-mongoengine)## README In Progress## Installpip install pyramid-mongoengine## ConfigBasic setup```pythonif __name__ == "__main__":config = Configurator()config.include("pyramid_mongoengine")config.add_connection_database()````pyramid-mongoengine` provides `add_connection_database()`, he makes a connection with databaseusing data coming from .ini file.```pythonmongo_url = mongodb://my_ip_location_to_mongodbmongodb_name = "my_db_application"```If theses data not exists in .ini, `pyramid-mongoengine` use default values```python# Default valuesmongo_url = mongodb://localhostmongodb_name = "test"```## Creating models```pythonfrom pyramid_mongoengine import MongoEnginedb = MongoEngine()class User(db.Document):email = db.StringField(required=True)username = db.StringField(requred=True)```See [demo](https://github.com/marioidival/pyramid_mongoengine/blob/master/demos/app.py) application to examples## Support on BeerpayHey dude! Help me out for a couple of :beers:![![Beerpay](https://beerpay.io/marioidival/pyramid_mongoengine/badge.svg?style=beer-square)](https://beerpay.io/marioidival/pyramid_mongoengine)  [![Beerpay](https://beerpay.io/marioidival/pyramid_mongoengine/make-wish.svg?style=flat-square)](https://beerpay.io/marioidival/pyramid_mongoengine?focus=wish)
Package: pyramid_mongokit
A simple Pyramid extension that registers a mongokit connection as an
attribute of the request object.ExpectsMONGO_URIinos.environ.If provided as environment variables,MONGO_DB_PREFIXwill be used as
prefix for any databases andMONGO_DB_NAMEfor database name.Source code & example onhttps://github.com/hadrien/pyramid_mongokitChangelogDevelopment0.2Add register decorator to register documents to mongokit and generate indexes
when doing a config.scan.Add an introspectable for each registered document.0.1.1Add name when registring utility to zope registry to be compatible with
zope.interface==4.1.00.1Use MongoReplicaSetClient when specified by mongo uri.Mongo Session lazily opened.Add config directives to register and index documents and to get mongo
connection.0.0.6Read preference set to secondary preferred by default at construct time.0.0.5Break compatibility with 0.0.4 asregister_documentdoes not generate
indexes anymore.Addgenerate_indexfunction.Break apart Connection classes:MongoConnectionis not anymore tied to a
single databases andSingleDbCOnnectionis tied to a single database.Add an example used for documenting and functional testing.0.0.4registering document ensures index are created.0.0.0Initial version
Package: pyramid_mongo_session
You can tryhttps://pypi.python.org/pypi/mongodb-beaker2which released in 2012… I couldn’t, I gave up.# encoding: utf-8

from pyramid.config import Configurator
from pyramid_mongo_session import MongoSessionFactory
...

def main(global_config, **settings):
    config = Configurator(settings=settings)

    session_factory = MongoSessionFactory(
        collection=MongoClient('localhost', 27017).your_db.session)
    config.set_session_factory(session_factory)
    ...
    return config.make_wsgi_app()Documentation:https://github.com/tark-hidden/pyramid_mongo_session
Package: pyramid-multildap
pyramid_multildappyramid_multildapis a friendly fork ofpyramid_ldap,
incorporating some changes which have been proposed upstream,
but have not been accepted (yet?).The package is being developed at github:https://github.com/lmctv/pyramid_multildapThe package’s documentation is hosted athttp://pyramid-multildap.readthedocs.org/Original README follows:pyramid_ldappyramid_ldapprovides LDAP authentication services for your Pyramid
application.  Thanks to the ever-awesomeSurveyMonkeyfor sponsoring the development of this package!See the documentation athttp://docs.pylonsproject.org/projects/pyramid_ldap/en/latest/for more
information.This package will only work with Pyramid 1.3a9 and better.Changes:
Next release
————Replace usage of deprecatedset_request_propertywithadd_request_methoddeprecatedConvert sampleapp to a minimal ldapauth scaffoldAdd attrlist to LDAPQuery, set_login_query, set_groups_query to allow
retrieved attributes to be filtered. (Default: All attributes on users, no
attributes on groups). Seehttps://github.com/Pylons/pyramid_ldap/pull/8Support creation of multiple co-existing ldap contexts in the same
application. Seehttps://github.com/Pylons/pyramid_ldap/pull/6Add a “search_after_bind” attribute to the _LDAPQuery class, to
help in reading directory entry attributes when the directory server
is configured to hide them in the before login search phase.
Seehttps://github.com/Pylons/pyramid_ldap/pull/5Set a size limit on pre-login entry dn searches.Escape user-provided login names, avoiding server errors or trivial
DOSs caused by user names like ‘user*name’ or ‘user(middle)name’Prevent the use of zero-length password authentication.  Seehttps://github.com/Pylons/pyramid_ldap/pull/130.1Initial version
Package: pyramid-nacl-session
pyramid_nacl_session: Encrypting Pyramid Session CookiesThis Pyramid add-on defines an encrypting, pickle-based cookie serializer,
usingPyNaCl[1] to generate the symmetric encryption for the cookie state.[1]https://pynacl.readthedocs.io/en/latest/secret/See:docs/index.rstfor the documentation.NoteInitial development of this library was sponsored by ZeOmega Inc.Changelog1.0.0 (2020-08-17)Addsession_factory_from_settingsandincludeme.
Seehttps://github.com/Pylons/pyramid_nacl_session/pull/11Support thesamesiteoption and default toLax.
Seehttps://github.com/Pylons/pyramid_nacl_session/pull/14Drop Python 2.6, 3.3, and 3.4 support.Add Python 3.6, 3.7 and 3.8 support.0.3 (2016-02-16)Drop Python 3.2 support.Drop the trailing padding (=) from base64 content.
Seehttps://github.com/Pylons/pyramid_nacl_session/pull/7Add theEncryptedCookieSessionFactoryas the primary API for using
an encrypted session.
Seehttps://github.com/Pylons/pyramid_nacl_session/pull/60.2 (2015-11-23)Split theEncryptingPickleSerializerintoEncryptedSerializerwith a default dependency onpyramid.session.PickleSerializerallowing
alternative serializers to be used with the encryption interface.
Seehttps://github.com/Pylons/pyramid_nacl_session/pull/40.1 (2015-11-23)Initial release.
Package: pyramid_nitro
ImportantThis package is currently in the “planning” stage. In short, much of
the conceptual parts of the package exist in disparate locations:
this package was created to bring those concepts together.Thepyramid_nitropackage adds dependencies, useful libraries,
sensible default configurations, “glue code”, and other goodies to a
“standard pyramid application” that makes developing pyramid
applications fast…superfast. In short, it’s the “batteries
included”opinionatedversion ofPyramid. It draws it’s inspiration
from theTurboGearsapplication framework.ProjectHomepage:https://github.com/canaryhealth/pyramid_nitroBugs:https://github.com/canaryhealth/pyramid_nitro/issuesTL;DR$pipinstallpyramid_nitro$nitro"myapp"/path/to/myapp$cd/path/to/myapp$nitroetc/dev.iniStartingsubprocesswithfilemonitorcompletedconfigurationofmyapp/0.1.0-b[env=dev]StartingserverinPID18330.servingonhttp://0.0.0.0:9000OverviewThe objectives ofpyramid_nitroare three-fold:Trivial to get a completely functional application goingLots of out-of-the-box functionality, but nothing that can’t be disabledSupport for infinite scalability when neededSome of the opinions made to achieve that is that you’ll:expose and document API endpoints withpyramid_controllersandpyramid_describeparse and serialize HTTP requests withpyramid_inputandpyramid_outputvalidate and sanitize data formats withpyramid_armorauthenticate requests with SAML or models with (TODO: to be determined)perform access control withpyramid_authzpaginate response datasets withpyramid_paginationuseSQLAlchemyfor your ORM modelstore ORM data inPostgreSQLand big data inMongoDBsend message bus events overRabbitMQschedule asynchronous and deferred jobs withpyramid_schedulermanage configurations withpyramid_iniheritgenerate JavaScript, CSS, and images withpyramid_webassets,lesscenable sessions and caching withpyramid_beakerencrypt data with GPG keysthoroughly implement unit/integration/system tests withpyramid_testthink globally but act locally with i18nuseApacheto infinity-scale your serverdepend on microservices, such as:indexing and searching withSolrURL-shortening withpyramid_tinyurl
Package: pyramid_oauth2_provider
pyramid_oauth2_provider README==================Getting Started---------------In an existing pyramid project you can take advantage of pyramid_oauth2_providerby doing the following:* Add `config.include('pyramid_oauth2_provider')` to your project setup. Thiswill configure a `/oauth2/token` route for the token endpoint and anauthentication policy that will support oauth2. If you want to be able to useboth cookie auth and oauth2 at the same time, you should use the`pyramid_oauth2_provider.authentication.OauthTktAuthenticationPolicy` insteadof the default.* Define a implementation of the `pyramid_oauth2_provider.interfaces.IAuthCheck`interface that works against your current user authentication check mechanism.* In your paster configuration configure which IAuthCheck implementation to useby specifying `oauth2_provider.auth_checker`.* In your development configuration, you may also want to disable sslenforcement by specifying `oauth2_provider.require_ssl = false`.* Generate client credentials using the `create_client_credentials` script,provided as part of `pyramid_oauth2_provider`.Request Flow------------Let's start by laying out a few ground rules when it comes to oauth2:1. All requests *must* be made via HTTPS.2. All data is transferred in headers and the body of messages rather thanthrough url parameters.The token endpoint is provided as a way to obtain and renew `access_tokens`.#### Example initial token request:POST /oauth2/token HTTP/1.1Host: server.example.comAuthorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JWContent-Type: application/x-www-form-urlencodedgrant_type=password&username=johndoe&password=A3ddj3w* The basic auth header is the `client_id:client_secret` base64 encoded.* Content-Type must be application/x-www-form-urlencoded#### Example refresh token request:POST /token HTTP/1.1Host: server.example.comAuthorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JWContent-Type: application/x-www-form-urlencodedgrant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKW&user_id=1234* The basic auth header is the `client_id:client_secret` base64 encoded.* Content-Type must be application/x-www-form-urlencoded* The `grant_type` must be "refresh".* All form elements are required.#### Example token response:HTTP/1.1 200 OKContent-Type: application/json;charset=UTF-8Cache-Control: no-storePragma: no-cache{"access_token":"2YotnFZFEjr1zCsicMWpAA","token_type":"bearer","expires_in":3600,"refresh_token":"tGzv3JOkF0XG5Qx2TlKW","user_id":1234,}* The same response is returned for both auth token and refresh token requests.* The `token_type` will always be "bearer".* For purposes of this example the `access_token` and `refresh_token` areshorter than normal.
Package: pyramid-ogcapi
Pyramid OGC APITools used to facilitate the development of OGC API services with Pyramid.
Provide template the the HTML vies of the API, have a generic one for la kind of view.
Automatically create the routes and the views based on the OpenAPI 3 specification file and the OGC API common consideration.
Provide some functions to facilitate the create of the template.
Provide some functions to facilitate the create of the api.
Provide some functions to facilitate the creation od an OpenLayers Map.OGC API common consideration that we will consider to create some facilitation:The f argument to switch between the HTML and the JSON view.The link definition.The paging definition.It will also provide an example of the OGC API Feature service with:The crs parameter..The CQL filter based on (pygeofiler)[https://pypi.org/project/pygeofilter/].The CRUD interface.Installationpython3-mpipinstallpyramid-ogcapiGetting startedGet the OGC API bundled specifications from theOGC GitHub organization,
and save it asogcapi-bundled.json.Add in your configuration:config.include("pyramid_ogcapi")config.pyramid_openapi3_spec('ogcapi-bundled.json',apiname='ogcapi')config.pyramid_openapi3_add_explorer(apiname='ogcapi')config.pyramid_ogcapi_register_routes(apiname='ogcapi')Integrate withjsonschema_gentypes.Add the following views:frompyramidimportview_configfrompyramid_ogcapiimportrequest_dictfrom.ogcapiimportOgcapiCollectionsCollectionidGet,OgcapiCollectionsCollectionidGetResponse@request_dictdefmyview(request:pyramid.request.Request,request_typed:OgcapiCollectionsCollectionidGet,)->OgcapiCollectionsCollectionidGetResponse:return{...}Integrate withjsonschema_gentypesStart exampleRun the example:makerunOpen theSwagger UI.Open theOpenAPI main page.ContributingInstall the pre-commit hooks:pipinstallpre-commit
pre-commitinstall--allow-missing-configTheprospectortests should pass.The code should be typed.The code should be tested withpytests.
Package: pyramid_pages
pyramid_pagespyramid_pagesprovides a collections of pages to your Pyramid application.
This is very similar todjango.contrib.flatpagesbut with a tree structure
and traversal algorithm in URL dispath.See documentationhttp://pyramid-pages.readthedocs.org/en/master/Support and DevelopmentTo report bugs, use theissue trackerorwaffle board.We welcome any contribution: suggestions, ideas, commits with new futures, bug
fixes, refactoring, docs, tests, translations etcIf you have question, contact mesacrud@uralbash.ruor IRC channel #sacrudLicenseThe project is licensed under the MIT license.
Package: pyramid_pagination
Easy pagination for Pyramid applications! It currently has built-in support
for paginating:Iterable types (lists, tuples)SQLAlchemy Query objectsBut can support pagination over any data type via extensions.ProjectHomepage:https://github.com/canaryhealth/pyramid_paginationBugs:https://github.com/canaryhealth/pyramid_pagination/issuesManual:https://github.com/canaryhealth/pyramid_pagination/blob/master/doc/manual.rstTL;DRInstall with:$pipinstallpyramid_paginationUse default pagination with:frompyramid_paginationimportpaginate@paginatedefview(request):returnrange(30)Then a request without parameters results in:{"result":[0,1,2,...,22,23,24],"page":{"offset":0,"limit":25,"count":30,"attribute":"result"}}Paginating with some defaults changed and adding some attribute-based
sort methods:frompyramid_paginationimportpaginate@paginate(limit_default=2,comparers=['name','value'])defview(request):return[dict(name='alph',value=1),dict(name='beta',value=2),dict(name='zeta',value=3),dict(name='alph',value=4),]Then a request with parameters?page.offset=1&page.limit=3&page.sort=name-,valueresults in:{"result":[{"name":"beta","value":2},{"name":"alph","value":1},{"name":"alph","value":4}],"page":{"offset":1,"limit":3,"count":4,"sort":"name-,value","attribute":"result"}}
Package: pyramid_pluggable_session
pyramid_pluggable_sessionWant to be able to change out session backends using a simple configuration
change, want to store your session data in a new location but re-implementing
ISession from Pyramid looks too daunting, fear not, pyramid_pluggable_session
makes this really simple.Is this a pyramid_beaker replacement?Yes. Although I’ve already been told that unless I implement ALL existing
beaker backends that I am not doing it right, so I am hereby doing it wrong
;-).Pull requestsWant to add a new backend? Perfect. Want to write some tests? Documentation?
The whole nine yards? Please!Clone this repo, create a new topic branch, and hack hack hack.Push your topic branch to GithubCreate a new pull requestI will review it, and if all is well pull it into this source tree!0.0.0a2Add better protection against session fixation:Upon failure to deserialize/unpack/expiration of session a new session id
is generated.Upon calling invalidate() a new session is generated with a new session
idAdd more clean-up using the new clear() functionality. When a session fails
to deserialize, we remove it from the backends, if a session fails to unpack
we remove it from the backends, and if it has expired we also remove it from
the backends.Update the included backends memory/file/chain to add the new clear()
function required by IPlugSession.Add clear() to IPlugSession interface to allow the session to explicitly have
the backend plugs remove the session data associated with a certain session
id.On _save_session we set the cookie to response that is provided to us by the
callback, and not request.response which may not be the users response.0.0.0a1New features:A file based session storage now exists.A chain can now be constructed for session storage0.0.0devA new ISession compliant Pyramid session provider appears.A single backend exists, it is based on local Pyramid memory.
Package: pyramid-prometheus
A tween which exposes basic Pyramid statistics to Prometheus.SetupYou can either include the exporter in your project’s__init__.py:config = Configurator(.....)
config.include('pyramid_prometheus')Or you can use the pyramid.includes configuration value in your.inifile:[app:myapp]
pyramid.includes = pyramid_exclogSettingsprometheus.port:port number to expose metrics on. If not set, metrics
are not exposedprometheus.slow_request_threshold:Number of seconds as a float.
If a request takes longer than this, it is logged in the metricpyramid_slow_requests
Package: pyramid_promosite
pyramid_promosite - is not CMS, this is a module that helps you quickly create a website. Pyramid_promosite is similar to django flatpages, but written in pyramid and more features.Getting Startedcd <directory containing this file>$venv/bin/python setup.py develop or pip install pyramid_promosite$venv/bin/populate_pyramid_promosite development.ini$venv/bin/pserve development.iniFeaturesadmin pageadmin, moderator, editor, author rolecreate and sort pagescreate translations of pagescreate subpagesWYSIWYG editor with upload imagestags for page if you want to create blogmultilanguages supporttemplate for mobile phone readyflexibilitySiteshttp://platonaps.ru(https://github.com/uralbash/platonaps.ru/)your site there…TODORRSlogs of users activityversioning pagesautosave pageRESTHelpif you have the opportunity to help the project, I would be happy to finalize:testsdocs forhttps://readthedocs.orgtranslate on other langugessecurity with crypt(bcrypt or sha) and group tablescaffolds for pcreaterewrite templates for true CSS, HTML designanything from TODOor anything else…PermissionCRUD - create, read, update, deleteAdmin can CRUD ALLModerator can CRUD all pages and imagesEditor can CRUD all pagesAuthon can CRUD only own pagesScreenshots![ScreenShot](https://raw.github.com/uralbash/pyramid_promosite/master/pyramid_promosite/static/img/img1.png)![ScreenShot](https://raw.github.com/uralbash/pyramid_promosite/master/pyramid_promosite/static/img/img2.png)![ScreenShot](https://raw.github.com/uralbash/pyramid_promosite/master/pyramid_promosite/static/img/imgr3.png)![ScreenShot](https://raw.github.com/uralbash/pyramid_promosite/master/pyramid_promosite/static/img/imgr4.png)0.0Initial version
Package: pyramid_ptpython
Aptpythonandptipythonplugin
forpyramidpshell.InstallationInstall from PyPI usingpiporeasy_install.$pipinstallpyramid_ptpythonYou can also add theipythondependency forptipython:$pipinstallpyramid_ptpython[ipython]Usageptipythongets auto-selected if it is the only shell installed for pyramid.$ pshell development.iniTo select a specific shell you can simply passptpythonorptipythonas
shell argument to pyramidspshell.$ pshell -p ptpython development.iniOr definedefault_shellin thepshellsection of your ini-file like:[pshell]
default_shell = ptpython1.2Support custom ptpython configUse global ptpython historyFix autocomplete1.1Minimum pyramid version required is > 1.6a2pyramid.pshellis nowpyramid.pshell_runnersee:https://github.com/Pylons/pyramid/pull/20121.0First release
Package: pyramid_pycallgraph
This package provides a Pyramid tween to generate a callgraph image for every request.It uses thePython Call Graphpackage for tracing and graph generation.
See its documentation for example images.UsageAddpyramid_pycallgraphto thepyramid.includesin your application’s.inifile:pyramid.includes =
    pyramid_pycallgraphConfigurationThe default options of thepycallgraph.config.Configobject can be overridden in your application’s.inifile.Example:pycallgraph.include_stdlib = True
pycallgraph.max_depth = 10000

pycallgraph.trace_filter.exclude =
pycallgraph.trace_filter.include =
    sqlalchemy.*
    pyramid.*
    myapp.*DevelopmentStatusCurrentlypyramid_pycallgraphis in alpha / development state and should be considered no more than a proof of concept.
There are no tests at all and it might or might not work for you.ContributionsContributions are highly welcome.
Just clone theGithub repositoryand start hacking.
If you think your work might be generally useful, feel free to open a pull request.Changelog0.1.0 - 2015-12-21Initial version