Saravanan666/pypi-org huggingface dataset:
Package: pyramid-debugtoolbar-dogpile
pyramid_debugtoolbar_dogpileBuild Status:dogpile caching support for pyramid_debugtoolbarThis package tracks the following dogpile api calls :get
get_multi
set
set_multi
delete
delete_multiYour pyramid_debugtoolbar will have a "Dogpile" panel that lists:the number of calls (in tab header)statistics on cache hits/misses/timing per api call typea listing of all calls that features: call, key, hit/miss, timingAs of v0.1.4 you can filter the keys on the panel. yay.This package works by wrapping requests to dogpile regions into a Proxy Backend.  This has a significant performance overhead and relies on the DEBUG ONLYget_current_request, so make sure that you disable this LoggingProxy on production machines.As of v0.1.5 you can sort-of track payload sizes.  This isvery experimental.  See below.This package works in Python2.7 and Python 3.xhow to use this packageinstall via github's main or grab a pypi distribution!pip install pyramid_debugtoolbar_dogpile
easy_install pyramid_debugtoolbar_dogpileupdate your ENVIRONMENT.ini filepyramid.includes = pyramid_debugtoolbar
debugtoolbar.includes = pyramid_debugtoolbar_dogpileupdate your caching configuration to use the proxy:from pyramid_debugtoolbar_dogpile import LoggingProxy as DogpileLoggingProxy

cache_config = {}
...
cache_config['wrap'] = [DogpileLoggingProxy, ]
region = make_region()
region.configure_from_config(cache_config)Tracking Payload SizeTracking Payload Size is experimental and VERY TRICKY because the correct hooks do not live in the standard packages.  Most users will not be able to do it -- or want to do it.NOTE: This breaks/abuses dogpile's API.In order to track payload size, you must write a custom backend OR use a backend that supports custom serializers, and "repack" the CachedValues with a "sz" attribute in the metadata.This specialized serialize for an alternate Redis backend,https://github.com/jvanasco/dogpile_backend_redis_advanced, injects a payload size attribute into CachedValuesdef SerializerPickleInt_loads(value):
	"""build a new CachedValue"""
	serialized_size = len(value)
	value = cPickle.loads(value)
	return CachedValue(value[0],
					   {"ct": value[1],
						"v": value_version,
						"sz": serialized_size,
						})If this package detects any size payloads in the tracked values, it will display size columns that report the number of bytes per key (and in aggregate reports).  If the package
does not detect anyszpayloads, it will not display the "Size" columns.Why track size?Some routes in a project were taking too much time, even with caching.  Tracking size - in addition to time - made it easier to pinpoint problematic objects and create a different/leaner caching object.What does it look like?The panel renders in two parts:First Section - topline statisticsSecond Section - chronological list of cache operations. API calls and results are color-coded for quick review.
Package: pyramid_debugtoolbar_mongo
An extension panel for Pyramid Debug Toolbar that adds
MongoDB debugging informationThis is a clone ofhttps://github.com/hmarr/django-debug-toolbar-mongofor the Pyramid Debug Toolbar (https://github.com/Pylons/pyramid_debugtoolbar)SetupAdd the following lines to your paster config file:pyramid.includes=...pyramid_debugtoolbarpyramid_debugtoolbar_mongo...debugtoolbar.panels=pyramid_debugtoolbar.panels.versions.VersionDebugPanelpyramid_debugtoolbar.panels.settings.SettingsDebugPanelpyramid_debugtoolbar.panels.headers.HeaderDebugPanelpyramid_debugtoolbar.panels.request_vars.RequestVarsDebugPanelpyramid_debugtoolbar.panels.renderings.RenderingsDebugPanelpyramid_debugtoolbar.panels.logger.LoggingPanelpyramid_debugtoolbar.panels.performance.PerformanceDebugPanelpyramid_debugtoolbar.panels.routes.RoutesDebugPanelpyramid_debugtoolbar.panels.sqla.SQLADebugPanelpyramid_debugtoolbar.panels.tweens.TweensDebugPanelpyramid_debugtoolbar.panels.introspection.IntrospectionDebugPanelpyramid_debugtoolbar_mongo.panels.mongo.MongoDebugPanelAn extra panel titled “MongoDB” should appear in your debug toolbar.Obtaining stack traces can slow down queries significantly. To turn them off
add the following lines to your paster config file:debugtoolbarmongo.stacktrace=falseTODONice layoutDrop down for the stack traceTestsContributions welcome
Package: pyramid_debugtoolbar_security
pyramid_debugtoolbar_security is a security panel for pyramid_debugtoolbar
(principals, context acl, view permission).UsagePut panel definition on your ini file:debugtoolbar.panels =
    pyramid_debugtoolbar_security.SecurityVarsDebugPanelIf you need other panels too:debugtoolbar.panels =
    pyramid_debugtoolbar.panels.versions.VersionDebugPanel
    pyramid_debugtoolbar.panels.settings.SettingsDebugPanel
    pyramid_debugtoolbar.panels.headers.HeaderDebugPanel
    pyramid_debugtoolbar.panels.request_vars.RequestVarsDebugPanel
    pyramid_debugtoolbar.panels.renderings.RenderingsDebugPanel
    pyramid_debugtoolbar.panels.logger.LoggingPanel
    pyramid_debugtoolbar.panels.performance.PerformanceDebugPanel
    pyramid_debugtoolbar.panels.routes.RoutesDebugPanel
    pyramid_debugtoolbar.panels.sqla.SQLADebugPanel
    pyramid_debugtoolbar.panels.tweens.TweensDebugPanel
    pyramid_debugtoolbar.panels.introspection.IntrospectionDebugPanel
    pyramid_debugtoolbar_security.SecurityVarsDebugPanelLicenseApache Software License 2.0History0.1.2 (2014/2/18)fix: use with pyramid_layout cause KeyError exception.0.1.1 (2014/2/7)fix again: null request.context cause exception0.1.0 (2014/2/7)add: displaying view permission valuefix: null request.context cause exception0.0.1 (2014/2/6)panel provids: user ids, principals, context acl, view name, view function, renderer and route information.
Package: pyramid-decoy
pyramid_decoypyramid_decoy, a simple pyramid app, which solely purpose is to redirect traffic away
to configured location, with hooks (in the future) to be able to plug in a tracking code.Package resourcesBug tracker:https://github.com/fizyk/pyramid_decoy/issuesDocumentation:http://pyramid_decoy.readthedocs.org/Travis-ciAfter creating package on github, move to tracis-ci.org, and turn on ci builds for given package.CHANGELOG0.2.0[enhancement] switched CI to github actions[enhancement] blackify code[python] support only python 3.8 and up0.1.0initial release allowing to redirect all links section assigned to decoy to one url.
Package: pyramid_describe
===================================Self-Documentation for Pyramid Apps===================================A Pyramid plugin that makes a Pyramid application self-documenting viainspection/reflection to:1. Describe the application URL structure,2. Extract documentation from Python comments, and3. Generate formal syntax using commenting conventions.The resulting documentation can be served by the application to anHTTP request or displayed on the command line. It has built-in supportfor plain-text hierachies, reStructuredText, HTML, PDF, JSON, YAML,WADL, and XML, however other custom formats can be added easily.Exposing an application's structure via HTTP is useful to dynamicallygenerate an API description (via WADL, JSON, or YAML) or to createdocumentation directly from source code.On the command-line it is useful to get visibility into anapplication's URL structure and hierarchy so that it can be understoodand maintained... note::Although pyramid-describe is intended to be able to describe anykind of pyramid application, currently it only supportspyramid-controllers_ based dispatch... note::Currently, pyramid-describe can only inspect the first Controllerit finds -- this will eventually be fixed to correctly implementthe `inspect` option.
Package: pyramid-di
pyramid_diEasier service location and dependency injection for Pyramid.UsageDefine services:# app/services/__init__.pyfrom.myimportMyServicefrom.anotherimportAnotherService# app/services/my.pyfrompyramid_diimportservice,RequestScopedBaseService,autowired@service()classMyService(RequestScopedBaseService):defmy_method(self):return'foobar'# app/services/another.pyfrompyramid_diimportservice,RequestScopedBaseService,autowiredfrom.myimportMyService@service()classAnotherService(RequestScopedBaseService):dependency=autowired(MyService)defanother_method(self):returnself.dependency.my_method()Setup when creating the Pyramid app:# Pyramid setup code:frompyramid.configimportConfiguratorwithConfigurator()asconfig:config.include('pyramid_di')config.scan_services('app.services')Use in views:frompyramid_diimportautowiredfrompyramid.viewimportview_configfrommy.servicesimportAnotherServiceclassMyViews:service=autowired(AnotherService)def__init__(self,request):# self.request is required for autowired to workself.request=request@view_config(route_name='some_view',renderer='json')defsome_view(self):returnself.service.another_method()# 'foobar'# alternatively, without class-based views:@view_config(route_name='some_view')defsome_view(request):service=request.find_service(AnotherService)service.another_method()# 'foobar'Mocking services for testingclassMockService:defanother_method(self):return'mocked'deftest_views():request=DummyRequest()my_views=MyViews(request)my_views.service=MockService()assertmy_views.some_view()=='mocked'DevelopmentDev setup:$ python3 -m venv venv
$ pip install -e '.[dev]'Tests are run with pytest:$ pytestChanges0.4.22023-05-28 Change from TravisCI to Github Actions, update testing matrix to cover Python 3.10 and Pyramid 2.0+.0.4.12021-03-19 The request-scoped services were not quite correct as they could have been instantiated twiceonce in the traversal-time and the other time after context was set. Now the context is forced to None
for the request-scoped services.0.4.02020-11-25 Python 3.6+ only; better test coverage, fixes for scoped services, deprecations and so forth.0.3.dev02020-11 Unreleased development version0.2.dev02020-11-04 Require Python 3 for cleaner code0.12018-03-26 Initial release
Package: pyramid_dogpile_cache
Introductionpyramid_dogpile_cacheis a tiny dogpile cache factory for Pyramid.SetupPutconfig.include('pyramid_dogpile_cache')somewhere in your startup code:config=Configurator(...)config.include('pyramid_dogpile_cache')Or alternatively you can addpyramid_dogpile_cacheto thepyramid.includeslist in the configuration:pyramid.includes=pyramid_dogpile_cacheUsage in Codepyramid_dogpile_cache.get_regionis the only API.frompyramid_dogpile_cacheimportget_regionregion=get_region('foo')# ... do whatever operation on the cache region ...Settingsdogpile_cache.regionsA list of region names to initialize through the factory.
Regions can be separated by either spaces or commas.dogpile_cache.backendThe default backend for cache regions.  You can later override it with the region-specific setting.dogpile_cache.expireThe default expiration time for cache regions.  You can later override it with the region-specific setting.dogpile_cache.arguments.*The arguments for the default backend.  You can later override it with the region-specific setting.dogpile_cache.function_key_generatorPassed tomake_region().dogpile_cache.key_manglerPassed tomake_region().dogpile_cache.async_creation_runnerPassed tomake_region().dogpile_cache.REGION.*Each set of region-specific settings is prefixed with the region name followed by the setting name.  For example, settings for regionfoocan be like the following:; global settingsdogpile_cache.backend=file; settings for foodogpile_cache.foo.backend=redisdogpile_cache.foo.arguments.host=127.0.0.1dogpile_cache.foo.arguments.port=6379dogpile_cache.foo.arguments.db=0dogpile_cache.foo.arguments.redis_expiration_time=7200dogpile_cache.foo.arguments.distributed_lock=1ContributorsMoriyoshi KoizumiChangelog0.0.1first release0.0.2minor documentation fixes0.0.3license inclusion (MIT)0.0.4packaging fix
Package: pyramid_duh
Pyramid DuhMaster Build:0.1 Build:Documentation:http://pyramid_duh.readthedocs.org/Downloads:http://pypi.python.org/pypi/pyramid_duhSource:https://github.com/stevearc/pyramid_duhThis is just a collection of utilities that I found myself putting intoevery
singlepyramid project I made. So now they’re all in one place.Here’s a quick taste.Don’t do this:def register_user(request):
    username = request.POST['username']
    password = request.POST['password']
    birthdate = request.POST['birthdate']Do this:@argify(birthdate=date)
def register_user(request, username, password, birthdate):
    ...What urls does this match?@view_config(context=Root, name='package')
def get_or_list_packages(request):
    ...Well, it matches/package/package//package/1234/package/wait/hold/on/package/this/seems/confusingWhaaaat? Let’s fix that:@view_config(context=Root, name='package', subpath=())
def list_packages(request):
    # return a list of packages

@view_config(context=Root, name='package', subpath=('id/*')
def get_package(request):
    package_id = request.named_subpaths['id']
    # fetch a single packageThe first one matches/package/package/The second matches/package/*/package/*/But that still seems sloppy. Youdemandconsistency!@view_config(context=Root, name='package', subpath=())
@addslash
def list_packages(request):
    # return a list of packages

@view_config(context=Root, name='package', subpath=('id/*')
@addslash
def get_package(request):
    package_id = request.named_subpaths['id']
    # fetch a single packageNow it’s just/package/and/package/*/That’s the sales pitch. Read the docs for more details.Changelog0.1.2Bug fix: Fix potential timezone issue when converting unix time to datetimeUsing the ‘six’ library for python 2/3 compatibility0.1.1Bug fix: IStaticResource fails to look up self.request if nested 2-deepBug fix: Name collisions with version_helper.pyBug fix: Subpath glob matching always respects caseFeature: @argify works on view classesFeature: @argify can inject types that consume multiple parametersFeature: Parameter types can be a dotted path0.1.0Package released into the wild
Package: pyramid-elasticapm
Contentspyramid-elasticapmInstallationSettingsChange log for pyramid-elasticapm1.0.5 (2024-01-16)1.0.4 (2022-08-31)1.0.3 (2022-08-31)1.0.2 (2022-08-30)1.0.1 (2021-04-22)1.0.0 (2021-04-21)pyramid-elasticapmelastic-apm integration for the Pyramid frameworkThis package is inspired byhttps://www.elastic.co/de/blog/creating-custom-framework-integrations-with-the-elastic-apm-python-agent.InstallationInstall with pip:$ pip install pyramid_elasticapmThen include it in your pyramid application via config:[app:main]
...
pyramid.includes = pyramid_elasticapmor programmatically in your application:config.include('pyramid_elasticapm')SettingsSettings for the elasticapm client can be specified via theelasticapmnamespace:elasticapm.server_url: Specify the apm server url.elasticapm.secret_token: Your secret authentication token for the server.elasticapm.service_name: The service nameelasticapm.environment: The environment (e.g. testing, production, …)elasticapm.service_distribution: The name of the package your are
deploying.pyramid_elasticapmwill retrieve the version number of this
package and put it into the metadata of every transaction.elasticapm.transactions_ignore_patterns: Whitespace separated list of
ignore patterns.Change log for pyramid-elasticapm1.0.5 (2024-01-16)fix:responsevariable was used before assignment in error handler.1.0.4 (2022-08-31)Request body was not added due to a bug, that is fixed now.1.0.3 (2022-08-31)Improve adding request body for requests and responses.1.0.2 (2022-08-30)Add request body for POST requests.1.0.1 (2021-04-22)Be more compatible with retrieving user data from request.1.0.0 (2021-04-21)Initial release.
Package: pyramid_es
pyramid_es - Elasticsearch Integration for PyramidScott Torborg -Cart Logicpyramid_esis a pattern and set of utilities for integrating theelasticsearchsearch engine with aPyramidweb app. It is intended to make it easy to
index a set of persisted objects and search those documents inside Pyramid
views. Transactions are supported (designed to work withpyramid_tm) and a full test suite is included.Docs are available atRead The Docs <http://pyramid-es.rtfd.org>.InstallationInstall with pip:$ pip install pyramid_esExample Usageclient=get_client(request)result=client.query(Movie).\filter_term('year',1987).\order_by('rating').\execute()
Package: pyramid-exclog
A package which logs Pyramid application exception (error) information to a
standard Python logger.  This add-on is most useful when used in production
applications, because the logger can be configured to log to a file, to UNIX
syslog, to the Windows Event Log, or even to email.See the documentation athttps://docs.pylonsproject.org/projects/pyramid-exclog/en/latest/for more
information.This package will only work with Pyramid 1.5 and better.1.1 (2022-03-12)Drop support for Python 2.7, 3.5, and 3.6.Support Python 3.7, 3.8, 3.9, 3.10.
Seehttps://github.com/Pylons/pyramid_exclog/pull/35Addexclog.hide_cookiesconfig option to mark certain
cookie values as hidden from messages.
Seehttps://github.com/Pylons/pyramid_exclog/pull/39Include the license file in the wheel.
Seehttps://github.com/Pylons/pyramid_exclog/pull/37Refactor source repo, blackify, and remove tests from package.
Seehttps://github.com/Pylons/pyramid_exclog/pull/411.0 (2017-04-09)Drop support for Python 3.3.Require Pyramid 1.5+.Move the tweenovertheEXCVIEWsuch that it also handles
exceptions caused by exception views.
Seehttps://github.com/Pylons/pyramid_exclog/pull/320.8 (2016-09-22)Drop support for Python 2.6 and 3.2.Add explicit support for Python 3.4 and 3.5.Handle IOError exception when accessing request parameters.Fix UnicodeDecodeError on Python 2 when QUERY_STRING is astrcontaining non-ascii bytes.Allways pass the logging module text rather than sometimes
bytes and sometimes text.0.7 (2013-06-28)Add explicit support for Python 3.3.Do not error if the URL, query string or post data contains unexpected
encodings.Try to log an exception when logging fails:  often the middleware is used
just inside one which converts all errors into ServerErrors (500), hiding
any exceptions triggered while logging.Addunauthenticated_user()to the output when theextra_infokey
is set to True (PR #11).Add a hook for constructing custom log messages (PR #15).Changed testing regime to allowsetup.py dev.We no longer test under Python 2.5 (although it’s not explicitly broken
under 2.5).0.6 (2012-03-24)Add anexclog.extra_infosetting to the exclog configuration.  If it’s
true, send WSGI environment and params info in the log message.0.5 (2011-09-27)Python 3.2 compatibility under Pyramid 1.3.X.0.4 (2011-08-24)Docs-only changes.0.3 (2011-08-21)Don’t register an implicit tween factory with an alias (compat with future
1.2).0.2 (2011-08-13)Improve documentation by providing examples of logging to file, email and
by describing deltas to default Pyramid 1.2 logging config.Use string value as factory to add_tween in includeme.0.1 (2011-08-11)Initial release.
Package: pyramid-exclusive-request-methods
ContentsIntroductionContributorsChangelog0.0.00.0.10.0.20.0.30.0.40.0.50.0.60.0.7Introductionpyramid_exclusive_request_methods enables one to add a view config whose view handles all the HTTP request methods and responds with405 Method Not Allowedfor the request methods not explicitly specified in the configuration.Synopsis:from pyramid_exclusive_request_methods import exclusive_view_config

@view_config(route_name='foo', request_method=['GET'])
def foo(context, request):
    pass

@exclusive_view_config(route_name='bar', request_method='GET')
def bar(context, request):
    pass

c = Configurator(...)
c.includeme('pyramid_exclusive_request_methods')ContributorsMoriyoshi Koizumi <mozo@mozo.jp>Changelog0.0.0Initial upload to pypi.0.0.1Switch toadd_exclusive_viewdirective andexclusive_view_configdecorator style, becauseExclusivelymarker doesn’t work as expected due to the limitation of Pyramid.0.0.2Bump due to the packaging failure.0.0.3Fix a bug that it doesn’t work with view classes.0.0.4Fix a bug that it doesn’t work with view_defaults.0.0.5Fix a bug that it doesn’t work when the views forms a multiview.0.0.6Fix for Pyramid 1.80.0.7Fix a bug that it doesn’t work when the different route is specified to each attribute of a view class in the view config.
Package: pyramid-fanstatic
pyramid_fanstaticThis package provide aPyramid tweenforfanstaticand a pyramid scaffold.ScaffoldJust run:$ pcreate -s starter -s pyramid_fanstatic myprojectOr:$ pcreate -s pyramid_fanstatic myexistingprojectif you want to addpyramid_fanstaticto an existing project.Then readREADME_FANSTATIC.txtFanstatic library definition is added toresources.py. Resources are
located in theresources/directory.Tween usageYou can use allfanstatic optionsin your.ini. You just need to prefix options withfanstatic.:[app:main]
...
fanstatic.publisher_signature = fanstaticYou should add at least those two options:fanstatic.bottom = true
fanstatic.debug = true # in development.iniThen includepyramid_fanstaticin your__init__.py:config.include('pyramid_fanstatic')Base URLs for resourcesStaticBy default, resource URLs from Fanstatic come served at in the script root and
Fanstatic provides itsbase_urloption to set a URL prefix for all
resource URLs. You can utilise this option statically using the following:[app:main]
...
fanstatic.base_url = https://example.com/myappTake note that the URL should not have a trailing slash - Fanstatic has
resources URLs that feature a/prefix already.DynamicThe above process works, but your application may need to serve from multiple
URLs, multiple paths, and so forth.pyramid_fanstatichas a special option
to allow thebase_urlprefix to be configured on a per-request basis. Your
application URI is generated usingwsgiref.util.application_uriand is
based upon the request environment (according toPEP 333).This option isfanstatic.use_application_uriand is specific topyramid_fanstaticand is not passed to Fanstatic.  Specify this option as
follows:[app:main]
...
fanstatic.use_application_uri = trueAny staticbase_urlthat is set will take precedence over this option.Changelog0.6 (2020-06-16)FeaturesAdd support for Python 3.7 and 3.8. [sallner, gotcha]OtherRemove zc.buildout and nosetest infratructure in favour of tox and pytest.0.5 (2013-11-08)Support fanstatic > 1.0 with backward compat0.4 (2012-09-21)Add new optionfanstatic.use_application_urito have Fanstatic
base URLs generated using the current request. Abase_urlthat is set
will override this option.
[davidjb]Document details about Fanstatic base URLs and thefanstatic.base_urloption.
[davidjb]0.3 (2011-12-27)Improve the Pyramid scaffold that’s available withpcreate.
[gawel]0.2 (2011-12-26)Forward requests to Pyramid handler if a resource can’t be found.
[gawel]Documentation and coverage improvements
[gawel]0.1 (2011-12-26)Initial release.
[gawel]
Package: pyramid_favicon
pyramid_faviconis an add-on for handling favicons in your Pyramid project. Normally,
the favicon.ico file is stored on a web site’s project root (e.g. /myproject_root/favicon.ico).
However, with this add-on, it is possible to specify a different location of favicon.ico
via a custom config setting (e.g. /myproject_root/some/other/location/favicon.ico).
Package: pyramid_file_session
As you know, SignedCookieSessionFactory stores a base64-encoded pickled object in a user cookie, which can be insecure in some cases.With this package your cookie has a md5-like string, that identifies a file which lives in a server’s directory (/tmpby default) and contains a pickled session object.To be honest, it is a modified version of pyramid.session.BaseCookieSessionFactory with the same behavior.Documentation:https://github.com/tark-hidden/pyramid_file_sessionChangelog0.1.1More accuracy work with files.with openinstead ofopen.0.1Initial release.