Skip to main content

asyncio transactional server to build REST API / Websocket with ZODB

Project description

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

  • depends on python 3.5

Getting started

We use buildout of course:

python3.5 bootstrap-buildout.py
./bin/buildout

The buildout installs the app itself, code analysis tools, and a test runner.

Run the zeo

To run the zeo on a different terminal:

./bin/runzeo -C zeo.cfg

Run the server

  • By default it mounts a zeo server and a ZODB so you need the ZEO server running.

To run the server:

./bin/server

Creating default content

Once started, you will require to add at least a Plone site to start fiddling around:

curl -X POST -H "Accept: application/json" -H "Authorization: Basic YWRtaW4=" -H "Content-Type: application/json" -d '{
  "@type": "Site",
  "title": "Plone 1",
  "id": "plone",
  "description": "Description"
}' "http://127.0.0.1:8080/zodb1/"

and give permissions to add content to it:

curl -X POST -H "Accept: application/json" -H "Authorization: Basic YWRtaW4=" -H "Content-Type: application/json" -d '{
  "prinrole": {
      "Anonymous User": ["plone.Member", "plone.Reader"]
  }
}' "http://127.0.0.1:8080/zodb1/plone/@sharing"

and create actual content:

curl -X POST -H "Accept: application/json" -H "Authorization: Basic YWRtaW4=" -H "Content-Type: application/json" -d '{
  "@type": "Item",
  "title": "News",
  "id": "news"
}' "http://127.0.0.1:8080/zodb1/plone/"

Run tests

We’re using py.test:

./bin/py.test src

and for test coverage:

./bin/py.test --cov=plone.server src/

Default

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

Running dependency graph

Using buildout:

./bin/buildout -c dependency-graph.cfg
./bin/dependencies-eggdeps > docs/dependency-graph.txt

1.0a6 (2016-11-21)

  • Fix issue where you could not save data with the API [vangheem]

1.0a5 (2016-11-21)

  • Adding zope.event compatible async handlers for ElasticSearch and other events handlers [@bloodbare]

  • Adding PostCommit and PreCommit Hooks that can be async operations [@bloodbare]

1.0a4 (2016-11-19)

Project details


Download files

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

Source Distribution

plone.server-1.0a6.tar.gz (87.5 kB view details)

Uploaded Source

File details

Details for the file plone.server-1.0a6.tar.gz.

File metadata

  • Download URL: plone.server-1.0a6.tar.gz
  • Upload date:
  • Size: 87.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for plone.server-1.0a6.tar.gz
Algorithm Hash digest
SHA256 ceedb48bac040cebe544eda2d9c3af960ba7e9833c009d50ec5f3e7dc5099060
MD5 138a93af90cabc0727d34f9781250c6d
BLAKE2b-256 f30c266e223aee003573e2e7f7e041633583a9bc03137b9a9ebab77796c22f3d

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