Skip to main content

asyncio REST API Resource database

Project description

Introduction

https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat https://travis-ci.org/plone/guillotina.svg?branch=master Test Coverage Python Versions https://img.shields.io/pypi/v/guillotina.svg License Chat

Please read the detailed docs

This is the working project of the next generation Guillotina server based on asyncio.

Dependencies

  • python >= 3.7

  • postgresql >= 9.6

Quickstart

We use pip:

pip install guillotina

Run postgresql

If you don’t have a postgresql server to play with, you can run one easily with docker.

Download and start the docker container by running:

make run-postgres

Run the server

To run the server:

g

Then…

curl http://localhost:8080

Or, better yet, use postman to start playing with API.

You can also navigate in your Guillotina server with its built-in web admin interface by visiting http://localhost:8080/+admin/.

Deploy on Heroku

Read more Guillotina-Heroku.

https://www.herokucdn.com/deploy/button.svg

Getting started with development

Using pip(requires python > 3.6):

git clone git@github.com:plone/guillotina.git
cd guillotina
python3.7 -m venv .
./bin/pip install -r requirements.txt
./bin/pip install -e .[test]

Run tests

We’re using pytest:

./bin/pytest guillotina

and for test coverage:

./bin/pytest --cov=guillotina guillotina/

With file watcher…

./bin/ptw guillotina –runner=./bin/py.test

To run tests with cockroach db:

USE_COCKROACH=true ./bin/pytest guillotina

Default

Default root access can be done with AUTHORIZATION header : Basic root:root

Docker

You can also run Guillotina with Docker!

First, run postgresql:

docker run --rm \
    -e POSTGRES_DB=guillotina \
    -e POSTGRES_USER=guillotina \
    -p 127.0.0.1:5432:5432 \
    --name postgres \
    postgres:9.6

Then, run guillotina:

docker run --rm -it \
    --link=postgres -p 127.0.0.1:8080:8080 \
    guillotina/guillotina:latest \
    g -c '{"databases": [{"db": {"storage": "postgresql", "dsn": "postgres://guillotina:@postgres/guillotina"}}], "root_user": {"password": "root"}}'

This assumes you have a config.yaml in your current working directory

Chat

Join us to talk about Guillotina at https://gitter.im/plone/guillotina

CHANGELOG

5.0.0a10 (2019-06-27)

  • Adding store_json property on db configuration so we can disable json storage for each db. [bloodbare]

5.0.0a9 (2019-06-27)

  • Move guillotina_mailer to guillotina.contrib.mailer [bloodbare]

  • Be able to customize the object reader function with the object_reader setting [vangheem]

  • Fix indexing data potentially missing updated content when fields for accessor is not specified [vangheem]

  • Executioner:
    • providing pagination support in navigation (1.2.0)

    • supporting token authentication from login form (1.3.0)

    • using @search endpoint to navigate in container items

  • A few more python antipattern fixes [lferran]

5.0.0a8 (2019-06-23)

  • Aggregations in PG JSONb [bloodbare]

5.0.0a7 (2019-06-22)

  • Change guillotina.files.utils.generate_key to not accept a request parameter. It was used to get the container id which is now a context var. [vangheem]

  • Add IExternalFileStorageManager interface to be able to designate a file storage that store a file into an external database. This enables you to automatically leverage the redis data manager.

  • Add cloud_datamanager setting. Allows you to select between db`(default) and `redis`(if `guillotina.contrib.redis is used) to not write to db to maintain state. The redis option is only usable for gcloud and s3 adapters.

5.0.0a6 (2019-06-22)

  • Cache password checked decisions to fix basic auth support [vangheem]

  • Make sure you can import contrib packages without automatically activating them [vangheem]

5.0.0a5 (2019-06-22)

  • Adding rediscache and pubsub logic. Now you can have memory cache, network cache with invalidation and pubsub service. guillotina_rediscache is not necessary any more. [bloodbare]

  • deprecate __local__properties__. ContextProperty works on it’s own now [vangheem]

  • Add argon2 pw hashing [vangheem]

  • Completely remove support for utilities configuration. Use load_utilities. [vangheem]

5.0.0a4 (2019-06-21)

  • Fix path__startswith query [vangheem]

5.0.0a3 (2019-06-21)

  • Add guillotina.contrib.swagger

5.0.0a2 (2019-06-19)

  • Missing mypy requirement

  • Fix catalog interface

  • Fix catalog not working with db schemas

  • Update intro docs

5.0.0a1 (2019-06-19)

  • Fix events antipattern [lferran]

  • Rename utils.get_object_by_oid to utils.get_object_by_uid

  • Emit events for registry configuration changes

  • Default catalog interface removes the following methods: get_by_uuid, get_by_type, get_by_path, get_folder_contents. Keep interfaces simple, use search/query.

  • Allow modifying app settings from pytest marks [lferran]

  • No longer setup fake request with login for base command

  • Moved ISecurityPolicy.cached_principals to module level function guillotina.security.policy.cached_principals

  • Moved ISecurityPolicy.cached_roles to module level function guillotina.security.policy.cached_roles

  • utils.get_authenticated_user_id no longer accepts request param

  • utils.get_authenticated_user no longer accepts request param

  • Removed guillotina.exceptions.NoInteraction

  • Removed guillotina.interfaces.IInteraction

  • auth_user_identifiers no longer accept IRequest in the constructor. Use utils.get_current_request

  • auth_user_identifiers no longer accept IRequest in constructor. Use utils.get_current_request

  • Remove IInteraction. Use guillotina.utils.get_security_policy()

  • Remove Request._db_write_enabled, Transaction now has read_only property

  • Remove Request._db_id, Use guillotina.task_vars.db.get().id

  • Remove Request.container_settings, Use guillotina.utils.get_registry

  • Remove Request._container_id, use guillotina.task_vars.container.get().id

  • Remove Request.container, Use guillotina.task_vars.container.get()

  • Remove Request.add_future. Use guillotina.utils.execute.add_future

  • Add guillotina.utils.get_current_container

  • Rename request_indexer setting to indexer

  • Rename guillotina.catalog.index.RequestIndexer to guillotina.catalog.index.Indexer

  • Rename IWriter.parent_id to IWriter.parent_uid

  • Rename guillotina.db.oid to guillotina.db.uid

  • Rename oid_generate setting to uid_generator

  • Rename BaseObject._p_register -> BaseObject.register

  • Rename BaseObject._p_serial -> BaseObject.__serial__

  • Rename BaseObject._p_oid -> BaseObject.__uuid__

  • Rename BaseObject._p_jar -> BaseObject.__txn__

  • separate transaction from request object

  • rename guillotina.transactions.managed_transaction to guillotina.transactions.transaction

You are seeing a truncated changelog.

You can read the changelog file for a complete list.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

guillotina-5.0.0a10.tar.gz (6.9 MB view details)

Uploaded Source

Built Distribution

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

guillotina-5.0.0a10-cp37-cp37m-macosx_10_14_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

File details

Details for the file guillotina-5.0.0a10.tar.gz.

File metadata

  • Download URL: guillotina-5.0.0a10.tar.gz
  • Upload date:
  • Size: 6.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for guillotina-5.0.0a10.tar.gz
Algorithm Hash digest
SHA256 af067afb07d65d50b978c39320cfdbf61932eeb856a59f3397e97eca67367ae2
MD5 6ba920540c6abe8b58988add36bee7e2
BLAKE2b-256 1a32c493279bc5b76dd609a79ea312ef9d98f964acdf37f01604cb250ba0f6ec

See more details on using hashes here.

File details

Details for the file guillotina-5.0.0a10-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: guillotina-5.0.0a10-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 6.5 MB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for guillotina-5.0.0a10-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 142d1274f628085f76d572345773242655ddeb3aa3011a6993a71ffacd2ebec4
MD5 9ec6641cad56f2ba073d480f5d960588
BLAKE2b-256 b5930501708a42d9bf1e3dd81cdf68916e05f2e0784a5e5b1b1e9241f68e8a70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page