Skip to main content
Python versions Build status Coverage Version status Documentation Status

AnyBlok / Pyramid

AnyBlok / Pyramid make the link between AnyBlok and Pyramid

It also gives you some bloks for adding user http authentication and role based authorization to your project.

Blok

Dependencies

Description

Pyramid

Add hooks to connect Pyramid authentification, OIDC Relying Party and authorization

auth

pyramid

Add ‘User’ and ‘User.Role’ models.

auth-password

auth

Add ‘User.CredentialStore’ model, a simple login, password table

authorization

auth

Add ‘User.Authorization’ model for managing permissions

user_identity

auth

Add some column on model Model.Pyramid.User

AnyBlok / Pyramid is released under the terms of the Mozilla Public License.

See the latest documentation

Front Matter

Information about the AnyBlok / Pyramid project.

Project Homepage

AnyBlok is hosted on github - the main project page is at https://github.com/AnyBlok/AnyBlok_Pyramid. Source code is tracked here using GIT.

Releases and project status are available on Pypi at http://pypi.python.org/pypi/anyblok_pyramid.

The most recent published version of this documentation should be at http://doc.anyblok-pyramid.anyblok.org.

Project Status

AnyBlok with Pyramid is currently in beta status and is expected to be fairly stable. Users should take care to report bugs and missing features on an as-needed basis. It should be expected that the development version may be required for proper implementation of recently repaired issues in between releases;

Installation

Install released versions of AnyBlok from the Python package index with pip or a similar tool:

pip install anyblok_pyramid

Installation via source distribution is via the setup.py script:

python setup.py install

Installation will add the anyblok commands to the environment.

Unit Test

To run framework tests with pytest:

pip install pytest
ANYBLOK_DATABASE_DRIVER postgresql ANYBLOK_DATABASE_NAME test_anyblok py.test anyblok_pyramid/tests

To run tests of all installed bloks:

dropdb test_anyblok
ANYBLOK_DATABASE_DRIVER postgresql ANYBLOK_DATABASE_NAME test_anyblok anyblok_createdb --install-bloks auth
ANYBLOK_DATABASE_DRIVER postgresql ANYBLOK_DATABASE_NAME test_anyblok py.test anyblok_pyramid/bloks/auth

dropdb test_anyblok
ANYBLOK_DATABASE_DRIVER postgresql ANYBLOK_DATABASE_NAME test_anyblok anyblok_createdb --install-bloks auth-password
ANYBLOK_DATABASE_DRIVER postgresql ANYBLOK_DATABASE_NAME test_anyblok py.test anyblok_pyramid/bloks/password

dropdb test_anyblok
ANYBLOK_DATABASE_DRIVER postgresql ANYBLOK_DATABASE_NAME test_anyblok anyblok_createdb --install-bloks authorization
ANYBLOK_DATABASE_DRIVER postgresql ANYBLOK_DATABASE_NAME test_anyblok py.test anyblok_pyramid/bloks/authorization

dropdb test_anyblok
ANYBLOK_DATABASE_DRIVER postgresql ANYBLOK_DATABASE_NAME test_anyblok anyblok_createdb --install-bloks user-identity
ANYBLOK_DATABASE_DRIVER postgresql ANYBLOK_DATABASE_NAME test_anyblok py.test anyblok_pyramid/bloks/user_identity

AnyBlok is tested continuously using Travis CI

Dependencies

AnyBlok works with Python 3.3 and later. The install process will ensure that AnyBlok, Pyramid are installed, in addition to other dependencies. The latest version of them is strongly recommended.

Contributing (hackers needed!)

Anyblok / Pyramid is at a very early stage, feel free to fork, talk with core dev, and spread the word!

Author

Jean-Sébastien Suzanne

Contributors

Anybox team:

  • Georges Racinet

  • Jean-Sébastien Suzanne

  • Simon André

  • Pierre Verkest

Sensee team:

  • Franck Bret

  • Jean-Sébastien Suzanne

ZeProfile team:

  • Franck Bret

  • Alexis Tourneux

Bugs

Bugs and feature enhancements to AnyBlok should be reported on the Issue tracker.

CHANGELOG

1.2.2 (2021-05-17)

  • Fixed before_commit SQLAlchemy event, the status of the transaction must be COMMITING or ACTIVE

1.2.1 (2021-05-17)

  • Forced Pyramid version before upgrade to 2.0

  • Refactored code to rename registry by anyblok

  • Improved coverage

1.2.0 (2020-12-03)

  • Added restrict_query_by_user decorator in order to apply query filters related to a given user

  • Added utilities to setup roles and authorizations

1.1.1 (2020-10-16)

  • Fixed the size of the fields model, because they have a foreign key to the model Model.System.Model on the field name. The next version of AnyBlok check that the size are the same

1.1.0 (2020-08-31)

  • Added IODC by Pierre Verkest <pierreverkest84@gmail.com>

  • Added enum_adapter for enum Column

  • Allow to set HttpOnly cookie in pyramid authkt configuration

1.0.0 (2020-05-12)

  • Added pyramid blok, used to do a better isolation

  • Created a new adapter for timedelta objects. It can parametrized using the new timedelta_adapter_factory and TimedeltaModes enumeration

  • Removed Python 3.4 capability

  • Removed Python 3.5 capability

  • Refactored unittest, replaced nose by pytest

0.9.5 (2019-11-01)

  • Fixed, missing dependencies

0.9.4 (2019-11-01)

  • Fixed #21 that zope.sqlalchemy 1.2 rename a class

  • [ADD] user-identity blok. Splitted anyblok_pyramid/auth blok to separate authentication fields from user identity fields

0.9.3 (2019-06-23)

  • Refactored unittest and helpper from nose to pytest

0.9.2 (2018-08-10)

  • Fix get_acl method

  • Add max age for static path, issue #13

0.9.1 (2018-05-30)

  • Fix get_acl method

  • Update logging output

0.9.0 (2018-02-27)

  • [FIX] commited session with pyramid

  • [ADD] Authentication configuration

  • [ADD] auth blok

  • [ADD] auth-password blok

  • [ADD] authorization blok

  • [FIX] console script whith gunicorn and wsgi server Put all the serveur in loadwithoutmigration=True, AnyBlok can add some lock during the migration and must do in specal action

0.8.2 (2017-12-23)

  • [FIX] anyblok cache invalidation

  • [FIX] replace SQLAlchemy deprecated extension by session events

0.8.1 (2017-11-28)

  • [REF] replace the overload of init_registry by init_registry_with_bloks

0.8.0 (2017-10-14)

  • [DEL] Remove configuration group definition preload

  • [REF] use configuration_post_load function to initialize services

0.7.2 (2017-10-18)

  • [ADD] Some apdater to convert to json

    • datetime_adapter

    • date_adapter

    • decimal_adapter

    • uuid_adapter

    • bytes_adapter

0.7.1 (2016-12-05)

  • [FIX] add pluggins in autoload configuration for unittest

  • [FIX] type replace asset by assert

  • [FIX] fix gunicorn script, load the plugins config part

0.7.0 (2016-07-11)

  • [FIX] Adapte for new release of AnyBlok 0.9.0

  • [Add] Plugin get_db_name

  • [ADD] some unittest

  • [REF] Update doc

0.6.3 (2016-06-20)

  • [FIX] bad release for 0.6.2

0.6.2 (2016-06-20)

  • [FIX] utf-8 encoding in setup, need for readthedocs

  • [REF] move from bitbucket (mercurial) to github (git)

0.6.1 (2016-04-18)

  • [FIX] for Python < 3.5

0.6.0 (2016-04-18)

  • [REM] remove old Controller declarations:
    • Declarations.Pyramid

    • Declarations.PyramidHTTP

    • Declarations.PyramidJSONRPC

    • Declarations.PyramidXMLRPC

  • [ADD] add anyblok request property

    registry = request.anyblok.registry
  • [ADD] installed_blok predicate for route and view

    @view_config(route_name='hello', installed_blok='my-blok')
    def say_hello(request):
        ...
  • [ADD] need_anyblok_registry predicate for route and view

    @view_config(route_name='hello', need_anyblok_registry=True)
    def say_hello(request):
        ...

0.5.3 (2016-03-17)

  • [REF] Preload database, add log and check if the database exist before load it

  • [FIX] catch simple exception to reput in real rpc exception

0.5.2 (2016-01-15)

  • [FIX] use anyblok parser for config with gunicorn

  • [REF] entry point init is now in anyblok

0.5.1 (2016-01-08)

  • [REF] Adapt with the new version of AnyBlok

  • [IMP] Add new entry point to load function before load AnyBlok bloks

0.5.0 (2016-01-07)

  • [ADD] pyramid_pm and zope.sqlalchemy to isolate each controller call

0.4.1 (2015-10-9)

  • [ADD] console script, implementation with gunicorn only

  • [ADD] wsgi script to give un app for wsgi server

0.4.0 (2015-08-25)

  • [REF] Add entry point to add new pyramid includeme and settings

  • [DEL] properties decorator, it is useless because pyramid have a better behaviour

  • [REF] add workingset to define overwritable callback used for application, no for the blok, add first callback, get_registry

  • [REF] unit test cause of new version of AnyBlok 0.5.0

  • [FIX] unit test case, update controller to unload the declaration when BlokManager are unloaded

0.3.2 (2015-06-22)

  • [REF] cause of upgrade version of AnyBlok 0.4.0

0.3.1 (2015-05-04)

  • [FIX] default value for beaker, None is better than ‘’

0.3.0 (2015-05-04)

  • [IMP] console script argsparse for pyramid and beaker

  • [ADD] MANIFEST.in

  • [FIX] script cause of remove logging configuration from AnyBlok

0.2.0 (2015-03-15)

  • [ADD] configurator callable

  • [REF] Adapt the import of python module of the blok, cause of the change in AnyBlok version 0.2.2

0.1.0 (2015-02-07)

Main version of AnyBlok / Pyramid. You can with this version

  • Declare Views / Routes for application

  • Declare controller (Views / Routes) which depend of the installation of bloks
    • XHR

    • JsonRPC

    • XmlRPC

  • Possibility to check some property as authentification

  • Possibility to define properties check

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anyblok_pyramid-1.2.2.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anyblok_pyramid-1.2.2-py3-none-any.whl (78.9 kB view details)

Uploaded Python 3

File details

Details for the file anyblok_pyramid-1.2.2.tar.gz.

File metadata

  • Download URL: anyblok_pyramid-1.2.2.tar.gz
  • Upload date:
  • Size: 49.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for anyblok_pyramid-1.2.2.tar.gz
Algorithm Hash digest
SHA256 9a253d4ace530bef3988315ab9a13cc5927e274bf2d8e3af3352a0a2a6d7c342
MD5 0076eb796c5269792d5415c070f0be76
BLAKE2b-256 8c17d80b53bb3ff913da825bd95042a51f926ccb70c2bb2f78e0e4c2b2bd4486

See more details on using hashes here.

File details

Details for the file anyblok_pyramid-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for anyblok_pyramid-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c56b07ff61349ace99da9a2f9487bee16ce86c4a8969490a1d8f6a8e0b39b480
MD5 c90557353a04a9669b0a7183020ebef3
BLAKE2b-256 6dc941ce4fbbe99a728963efcb6dffe534d8296e9fa17c149944c033def083b8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 files

1.2.1

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

1 file

0.6.3

1 file

0.6.2

1 file

0.6.1

1 file

0.6.0

1 file

0.5.3

1 file

0.5.2

1 file

0.5.1

1 file

0.5.0

1 file

0.4.1

1 file

0.4.0

1 file

0.3.2

1 file

0.3.1

1 file

0.3.0

1 file

0.2.0

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page