Hi,
I'm actually starting to study Pyramid.
My main goal is to be able to upgrade several quite huge applications which
are actually based on Zope 3 and heavily use the ZCA, without too much
rewriting.
One of our main use case is to define site managers (or local component
registries), to be
Hi,
For your information, this is the code I've produced to use local
components registry:
@subscriber(ContextFound)
def onContextFound(event):
context = event.request.context
if ISite.providedBy(context):
pyramid.threadlocal.manager.push({'registry':
context.getSiteManager(),
Hi,
Always on the road to adapting a Zope 3 application to Pyramid...
Another of my problems is that Zope3 is handling namespace traversers;
for example, you can use URLs like /++skin++MySkin/...,
/++etc++site/..., or anything else by defining custom namespaces.
In my use case, the goal of such
on default Pyramid traverser and it seems to work quite well.
But your solution may be more elegant for future use cases...
Best regards,
Thierry
2014-10-16 7:42 GMT+02:00 Laurence Rowe laurencer...@gmail.com:
On Wednesday, 15 October 2014 05:35:19 UTC-7, Thierry Florac wrote:
Hi,
Always
Hi,
Always trying to move from Zope3 to Pyramid...
After implementing traversal namespaces, I now need to convert other
important packages which are zope.pluggableauth and zope.securitypolicy.
Most of my applications security policy is actually based on these
packages, so I'm asking if anyone has
Thanks for the link.
Do you know of any fulltext indexing solution?
Best regards,
Thierry
2015-01-18 17:43 GMT+01:00 Tres Seaver tsea...@palladion.com:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 01/17/2015 07:28 PM, Thierry Florac wrote:
Hi,
I've written many Zope applications
Thanks ;-)
Thierry
2015-01-18 23:39 GMT+01:00 Tres Seaver tsea...@palladion.com:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 01/18/2015 05:31 PM, Thierry Florac wrote:
Thanks for the link. Do you know of any fulltext indexing solution?
Hypatia ships with a text index, derived from
Hi,
Based on Chameleon documentation, I'm trying to write a custom provider:
TALES expression which will allow to load another content provider
template, based on a registered named adapter.
The code is as follow:
class ProviderExpression(object):
provider: TALES expression
def
Hi,
On the model of zope.contentprovider provider: TALES expression, I'm
trying to register a new custom expression for Chameleon.
My code is very simple and tries to follow Chamelon documentation:
from chameleon import PageTemplate
def provider_expression(string):
def compiler(target,
Probably found!
I had to use PageTemplateFile.expression_types...
Regards,
Thierry
2015-01-25 13:36 GMT+01:00 Thierry Florac tflo...@gmail.com:
Hi,
On the model of zope.contentprovider provider: TALES expression, I'm
trying to register a new custom expression for Chameleon.
My code is very
Hi,
I slowly discover Pyramid...
I'm trying to write testing code in a Pyramid package using custom request
properties.
For example :
from pyramid.testing import setUp, tearDown, DummyRequest
config = setUp()
config.add_request_method(get_annotations, 'annotations',
reify=True)
Hi,
Did you tried using the TranslationStringFactory instead?
from pyramid.i18n import TranslationStringFactory_ =
TranslationStringFactory('eventbroker')
...
error_notaicalfile = _(The given Address didn't return...)
request.localizer.translate(error_notaicalfile)
I use this method with
Hi,
I use Authomatic and I'm happy with it... ;-)
Best regards,
Thierry
Le 15 avr. 2015 21:54, Achim Domma do...@procoders.net a écrit :
Hi,
I'm starting a small just-for-fun app, where I require users to login. I
don't want to implement user management on my own, so I would like to allow
Is your application deployed on local host?
By default the toolbar is only displayed for localhost...
Otherwise you can set your IP address in main section of your
development.ini:
debugtoolbar.hosts = 127.0.0.1 ::1
Regards,
Thierry
2015-06-18 13:09 GMT+02:00 r/ Wobben wobbe...@gmail.com:
Hi,
Do you want to create new management commands or do you just want to get
access to the shell?
Regards,
Thierry
2015-06-01 8:56 GMT+02:00 Chris Withers ch...@simplistix.co.uk:
Hi All,
Trying to get back into Pyramid, got a number of projects I want to use it
for, so expect plenty of
Hi Iain,
I've build a new set of utility fonctions to declare adapters or utilities
in the same Pyramid's way that is used to declare views (but without using
ZCML, of course).
This package is not public yet but I can share this code with you if you
need it...
Best regards,
Thierry
2015-07-16
Hi Iain,
I wrote a custom authentication policy which you can find here :
http://hg.ztfy.org/pyams/pyams_security/file/58599ce9e36e/src/pyams_security/utility.py
This policy is based on a registered Security manager utility, which is
mainly inspired by Zope3 authentication utility and can manage
Andreas Jung <li...@zopyx.com>:
>
>
>
> On 23 May 2016, at 9:26, Thierry Florac wrote:
>
> > Hi Andreas,
> >
> > I'm actually working on a Pyramid application framework (called "PyAMS")
> > including a pluggable authentication system (including an
Hi Andreas,
I'm actually working on a Pyramid application framework (called "PyAMS")
including a pluggable authentication system (including an Authomatic
module).
It provides some of the features you need but sadly it's actually far from
finished... :-/
Best regards,
Thierry
2016-05-22 20:58
Hi !
I often use internal IDs (via an IIntIds utility) to store objects
references.
The drawback of this method is that you have an indirection and you always
have to check that the reference target is still available before using it!
So even in this use case I use an event listener to remove the
Hi,
Actually I handle this use case using IObjectRemovedEvent subscribers.
Can't see any other simple way... :-/
Best regards,
Thierry
2016-04-21 9:36 GMT+02:00 Joe Steeve :
> How to maintain "referential integrity" in a ZODB. Simply put: When an
> object-A is removed from
Did you had a look at "pyramid_es" package?
It provides a custom data manager for ElasticSearch...
Regards,
Thierry
2017-01-23 20:19 GMT+01:00 Kai Groner :
> I found the data manager interface somewhat convoluted, so I wrote some
> adapters that allow you to write datamanagers
Currently using Debian, Awesome WM, and PyCharm as IDE with Mercurial as
DVCS.
Development as well as testing and production environments are built using
Buildout.
No issue... ;)
Regards,
Thierry
2017-02-23 19:42 GMT+01:00 Oliver :
> My IDE consists of ubuntu, awesome wm,
Hi,
I think "select2" is a perfect candidate for your needs.
I use it in my Pyramid applications but with z3c.form package and it works
perfectly with AJAX calls.
The simplest way is probably to create a JSON view which returns a list of
objects containing "id" and "text" attributes matching text
Here is another feedback about Zed's article:
https://eev.ee/blog/2016/11/23/a-rebuttal-for-python-3/
Regards,
Thierry
2016-11-24 20:54 GMT+01:00 Mike Orr :
> It also reminds me of the switch to the metric system. The reason
> Americans are adverse to it is that it was
Perfectly agree with previous comments!
I can't estimate the theory behind Turing machines and so on. But on a
practical point of view, I worked for a long time with Python 2 and Zope 3
and had to upgrade all my private packages to use them with Python 3
(starting with Python 3.) and Pyramid: the
Hi,
I need to build an AsyncIO based WSGI WebSockets server for Pyramid.
Until now I was using a stack made of GUnicorn, Pyramid and AIOPyramid and
it was working very well, but these packages seems to be un maintained and
last aiohttp package (used by AIOPyramid's GUnicorn worker) doesn't
Hi Julian,
I've build a "security package" for my own framework (called "PyAMS") which
includes a pluggable "security manager"' utility in which you can "plug"
extensions allowing you to use several authentication plug-ins; these
actually include "local users" (stored into ZODB), Authomatic
OK, I switched to Pyramid 1.9.1 (using CookieCSRFStoragePolicy, and
settings default CSRF options with require_csrf=True) and everything seems
to be OK!
Just added javascript code to always add my token (received as cookie) as
"X-CSRF-Token" header to every POST request...
Best regards,
Thierry
Hi,
I'm using Pyramid 1.84 and trying to implement a CSRF token cookie
verification for any POST or AJAX request.
My code is as follow:
CSRF_TOKEN_COOKIE_NAME = 'csrf_token'
@subscriber(INewRequest)
def handle_new_request(event):
"""Handle any request with CSRF token
Hi,
Maybe you should have a look at the "DataManager" component interface
provided by the "transaction" package.
This kind of component allows you to include your hook in a "two-phase
commit" transaction safely.
Several implementations are available, for example in the "repoze.sendmail"
package...
Hi Jonathan!
For sure I would be interested by such a debug toolbar extension which
could provide the same kind of information that we have for SQLAlchemy.
Of course if I can help or collaborate in coding or testing, just ask! ;)
Best regards,
Thierry
Le mer. 20 juin 2018 à 00:20, Jonathan
Hi,
I'm actually working on the implementation of a new website, moving from
Zope 3 to Pyramid (using ZODB).
When the new site will be ready, old contents will be gradually
reorganized, rewritten and moved from the old site to the new one; both
sites will be handled by different physical platforms
will have a chain that says specifically that the override is
> "closer" to your main than orig and thus its directives should win.
>
> - Michael
>
>
> On Wed, Feb 28, 2018 at 4:50 AM, Thierry Florac <tflo...@gmail.com> wrote:
>
>> Hi,
>> I created a view
Hi,
I created a view in a first package.
In another package (which is an optional extension of the first one), I
need to create another view but with the same name and the same settings as
the previous one but with another class which inherits from the first one.
By default, this raises a
Hi,
I created two new Python decorators in a Pyramid's project using Venusian
to define custom views and add functionalities to them.
I can have several decorators for the same view:
@page_config(name='myview.html', ...)
@ajax_config(...)
class MyViewClass(object):
"""My
I have several use cases where a request generates long operations (for
example, for doing conversion of an uploaded video file) but I want that
the end user receives the response as soon as possible (here, before
conversion ends).
In these cases, if the long operation is not impacted by the
And how do you handle such use case when working in a
multi-process/multi-hosts cluster configuration?
Le lun. 8 oct. 2018 à 19:10, Michael Merickel a écrit :
> If you are doing loading of data at "first run of the function" then you
> have introduced a race condition in your app where unless
tocols=['wsgi'])
> app = loader.get_wsgi_app()
> r = Request.blank('/localhost:6543')
> r.registry = app.registry
> apply_request_extensions(r)
> return r
>
>
>
> On Tuesday, January 15, 2019 at 5:09:18 AM UTC-5, Thierry Florac wrote:
>>
>> Hi,
>&g
Hi,
Simple question: I have a use case where I need to create an exact copy (a
clone) of a request, to update it's properties and make "simulations"
(actually by providing custom marker interfaces) without modifying the
original request.
Is there a good way to do this?
Actually I just tried to do
Hi,
After-commit hooks don't work in async mode!
They allow to declare callbacks which will be called after transaction
commit, but server is waiting for these callbacks to be finished (in
synchronous mode) before sending response to client.
If you need async mode, you have (at least) to start
Hi,
Don't know for the testing environment...
But why don't you use PersistentList / PersistentMapping classes instead of
classis list/dict for your inner properties?
Regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le dim. 24 févr. 2019 à 08:49, Gerhard Schmidt a
Hi everyone!
Just a small message to announce the birth of two new websites powered by
Pyramid!
I'm working for the french national forestry office and to manage it's new
website, I have built a new CMS called "Pyramid AMS" (shortened as
"PyAMS"); along with Python 3 and the Pyramid framework,
Hi,
In an application using ZODB traversal, I need to create a view whose
required permission depends on the state of the "context" object to which
the view is applied.
Can I just create an "un-protected" view (without static permission) and
check the permission in the view initialization code
e ACL based on its state? If you can have the context
> object be smarter then problem solved with a single permission. Otherwise
> yes you can certainly just handle it imperatively in the view code.
>
> On Thu, Jul 25, 2019 at 8:37 AM Thierry Florac wrote:
>
>> Hi,
>> In an
Hi,
Transaction API (ITransaction interface) allows to store user and
description (at least the matching request URL) into a given transaction
properties.
These properties are then visible using, for example, ZODBBrowser.
But I'm actually using RelStorage (2.1, actually testing new 3.0, with
https://relstorage.readthedocs.io/en/latest/zodbconvert.html).
>
> We have an open issue about improving the documentation for this at
> https://github.com/zodb/relstorage/issues/112
>
> Jason
>
> > On Nov 13, 2019, at 06:02, Thierry Florac > wrote:
> >
>
November 24, 2019 at 3:56:57 AM UTC-6, Thierry Florac wrote:
>>
>> Hi Andrew,
>>
>> I've built a notification mecanism using websockets in a Pyramid
>> application.
>> This is based on a second application process using gunicorn, while the
>> main
Hi,
I'm trying to test a Pyramid class decorator using Venusian in a simple
doctest!
Is there any way with Venusian to scan and "activate" such decorator?
Best regards,
Thierry
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To
Hi Andrew,
I've built a notification mecanism using websockets in a Pyramid
application.
This is based on a second application process using gunicorn, while the
main application process is using classic WSGI (with Apache).
The two processes also communicate using websockets; I handle client
I also have to be able to schedule tasks, so I actually include the
APScheduler package in my projects to make this scheduling.
Can pyramid-tasks be used also in this context?
Le mer. 6 janv. 2021 à 19:44, 'Jonathan Vanasco' via pylons-discuss <
pylons-discuss@googlegroups.com> a écrit :
>
I've built a custom Pyramid tween to handle this and redirect requests
while application is up!
It can handle redirects (based on regular expressions) before or after the
request is handled by Pyramid application, to be able to set the site in
"maintenance mode", or to handle custom redirects in
Very clear! :)
Many thanks !!
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le jeu. 12 nov. 2020 à 21:30, Michael Merickel a
écrit :
> Webob "request" objects are semi-ephemeral in the context of WSGI. Pyramid
> creates one while processing, and if you're using
Hi,
When we have to store custom information about current request, we can use
it's properties, attributes or environment (or even annotations).
What is the correct usage of each of them, and is there any benefit of
using one of them against the others?
Best regards,
Thierry
--
Hi Jonathan,
Thank you for this description of Celery!
I'll try to have a look at it if I can get a little time, it seems to be a
good replacement (probably more reliable!) of my own developments...
Best regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le mar. 5
# Call next tween/application and return its response
>>>> unchanged.
>>>> return handler(request)
>>>>
>>>> Then list your module in 'pyramid.includes' in the config file. E.g.,
>>>> "myapp.lib.mytween".
>&g
Fine!
I'll have to take some time to have a look at Celery and at your package,
to see how I can adapt my own scheduler framework to it...
Best regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le dim. 10 janv. 2021 à 03:09, Theron Luhn a écrit :
> Hi Thierry,
>
>
Hi,
Sorry if this is not a real Pyramid topic, but I'm looking for a few
advices...
I'm using zc.buildout for a very long time, with zc.recipe.egg, to build
all my Python packages and also to handle all my deployment environments,
and I've always been very happy with it! :)
But since a few
Hi,
I need to create custom sub-processes from my main Pyramid application;
these processes are used to handle "commands" received from ZeroMQ messages.
If I use the components registry to register adapters and utilities which
are also required in these processes, is there a way to start these
Hi Jonathan,
I didn't have a look at Celery yet, maybe it could work...
My goal is to be able to start long-running tasks (medias files conversions
for example) whose definition is stored in database and managed by end
users from my main Pyramid application; for this, I create a dedicated
ried before)!!
Maybe there is another better way to handle that anyway, so any advice is
always welcome!
Best regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le lun. 4 janv. 2021 à 18:25, Thierry Florac a écrit :
> Hi Jonathan,
>
> I didn't have a look at Celery yet
of a package and all its
dependencies?
Best regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le mar. 26 janv. 2021 à 11:27, Thierry Florac a écrit :
> Hi Steve,
> I know that Python 3.5 is outdated, but I still have old production
> environments which can't be
Hi,
Are you asking about the way to protect a view with a permission, or about
the way to grant this permission to a request?
Best regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le dim. 9 mai 2021 à 19:00, pzzcc a écrit :
> Hi,
>
> I am trying to wrap my head
he size. You'd want to
> do that upstream prior to the body being read if it's really large data
> you're worried about receiving.
>
> - Michael
>
> On Feb 7, 2021, at 09:06, Thierry Florac wrote:
>
> Hi,
>
> I'm starting to use Cornice, Colander and Swagger and I'm tryi
Hi,
I'm starting to use Cornice, Colander and Swagger and I'm trying to create
a REST service which should allow users to upload file(s)...
Until now I'm using "multipart/form-data" encoding and it seems OK, but :
- is it actually a good practice to handle file uploads in a REST API
using this
://www.ulthar.net -- http://pyams.readthedocs.io
Le mar. 9 févr. 2021 à 11:46, Steve Piercy a
écrit :
> On 2/9/21 12:56 AM, Thierry Florac wrote:
>
> > I found that Colander is probably lacking a few documentation about
> creating and registering custom types and converters
> I
Hi,
I've built a custom content management framework based on Pyramid; it's a
classic web application, based on ZODB and RelStorage with a PostgreSQL
backend, a Redis cache and an Elasticsearch index, and I'm actually looking
for the best production deployment option.
Until now, I always used
gt;
> Regards
> Estartu
>
> Am 13.10.23 um 08:18 schrieb Thierry Florac:
> > Hi Gerhard,
> >
> > Maybe it's not the best way to handle this, but I generally create
> > custom command-line scripts (using Buildout) and just check for
> sys.argv...
> >
I forgot to mention that I'm still using Pyramid 1.10.8, with various
Python versions from 3.5 to 3.11...
Best regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le mer. 18 oct. 2023 à 08:44, Thierry Florac a écrit :
> Hi!
> I have a problem with a P
Hi!
I have a problem with a Pyramid application which is deployed in production
with Apache 2.4 and mod_wsgi behind an HAProxy cluster.
On a "regular basis" and after some time of correct behaviour, I start to
receive HTTP 503 errors (service unavailable), but without any clear error
message.
The
Maybe I'm wrong, but I think that you can get access to the "global"
registry settings without the need of getting a request, no?
Regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le sam. 14 oct. 2023 à 11:14, Gerhard Schmidt a écrit :
> The ApplicationCreated
Hi Gerhard,
Maybe it's not the best way to handle this, but I generally create custom
command-line scripts (using Buildout) and just check for sys.argv...
Best regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le ven. 13 oct. 2023 à 07:00, Gerhard Schmidt a écrit :
Done!
Best regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le lun. 18 avr. 2022 à 19:15, Chris McDonough a écrit :
> > All green now on hypatia master (delta travis, which I forget how to
> use, but it doesn't matter, local tests and coverage pass), thanks for the
I personally use Apache with mod_wsgi, in multi-processes mode (from 1 to
16, based on vCPU count).
I know it's probably not the most "modern" option, but I know it, it works
pretty well and I didn't notice any problem (I use a PostgreSQL ZODB with
RelStorage and SQLAlchemy together).
I also used
Hi,
I'm actually using the Hypatia package for content indexing and I'm very
happy with it, but this package doesn't seem to be updated for a very long
time (2 years since last commit).
Actually, my own packages unit tests are failing when using Python 3.10
with Hypatia, so I was wondering if it
> directly).
>
> Please note that both Solr/ElasticSearch and Woosh offer faceting, a
> feature missing from the ZCatalog.
>
> Hope this helps,
>
> Laurent.
>
> Le dim. 17 avr. 2022 à 13:14, Thierry Florac a écrit :
> >
> > Hi,
> >
> > I'm actu
alog
>
> I would suggest asking whether there is any successor in Plone and Zope
> community (now that Plone absorbed Zope).
>
> https://community.plone.org/
>
> --steve
>
>
> On 4/17/22 4:14 AM, Thierry Florac wrote:
> > Hi,
> >
> > I'm actually using
,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le lun. 18 avr. 2022 à 03:15, Chris McDonough a écrit :
> I would likely be able to review any patches made to Hypatia
>
> --- Original Message ---
> On Sunday, April 17th, 2022 at 11:11 AM, Thierry Florac
>
ion was stolen from zope.catalog, it's probably fixed
> there.
>
>
>
>
>
>
> Original Message
> On Apr 18, 2022, 3:56 AM, Thierry Florac < tflo...@gmail.com> wrote:
>
>
> Hi Chris,
> That would be very nice! :)
> Actually, my own CI tests
Le jeu. 22 déc. 2022 à 11:13, Peter Wilkinson a
écrit :
>
>
> On 22 Dec 2022, at 6:44 pm, Thierry Florac wrote:
>
> My main usage are probably :
> - to find objects which are located below a given distance from a
> reference points
> - to find objects which a
Hi Peter,
I'm also using Hypatia for several years now without any problem, it works
very well!
So this "alpha" notice is probably useless!
I'm also interested in using spatial indexes in Hypatia, so I'm quite
excited to use your indexes.
And if you need any help to test these features, just
it could be useful to mix these queries with other attributes
queries directly from the catalog...
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le mer. 21 déc. 2022 à 23:32, Peter Wilkinson a
écrit :
>
>
> On 21 Dec 2022, at 7:21 pm, Thierry Florac wrote:
>
Hi!
I'm working on a Pyramid application using ZODB and RelStorage to store
Python objects into a PostgreSQL database.
This application is a document management application using many file blobs
which are stored on the filesystem (not in PostgreSQL), and a catalog is
used to index documents
ition.city wrote:
> On Tue, Jun 06, 2023 at 09:17:18AM +0200, Thierry Florac wrote:
> > Hi!
>
> Hello,
>
> > I'm working on a Pyramid application using ZODB and RelStorage to store
> > Python objects into a PostgreSQL database.
> > This application is a documen
I forgot to give you a link: https://gitlab.com/pyams/pyams-zodb-browser
Any feedback is greatly welcome! ;)
Best regards,
Thierry
--
https://www.ulthar.net -- http://pyams.readthedocs.io
Le dim. 11 févr. 2024 à 16:12, Thierry Florac a écrit :
> Hi Adam,
>
> I have built a
Hi Adam,
I have built a full web framework called PyAMS which is based on Pyramid
and ZODB, and which is including a ZODB browser package.
But it is actually lacking documentation, and including a complete
framework is probably not what you are looking for just to debug an app! :/
Best regards,
Hi,
My problem is probably quite simple: I would like to be able, in a Pyramid
application, to create a custom security policy which could use an SSL
client certificate as a request credential to handle authentication
(authorized certificates being referenced in a database or stored in a
specific
://www.ulthar.net -- http://pyams.readthedocs.io
Le mer. 15 nov. 2023 à 18:43, Theron Luhn a écrit :
> I’m unsure what this “request credential” is. Are you talking about TLS
> Mutual Auth?
>
> — Theron
>
>
>
> On Nov 15, 2023, at 6:13 AM, Thierry Florac wrote:
>
> Hi,
Hi Aaron,
Could you explain what is not working when you use Pyramid static views to
handle videos or audios files?
Best regards,
Thierry
Le sam. 23 mars 2024 à 21:08, Aaron Krister Johnson a
écrit :
> Hi all,
>
> I have a pyramid app on Dreamhost, and they are reverting from using
> Ruby's
89 matches
Mail list logo