Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api/versioning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pattern and uses this rule to be incremented:
this with a header like "Added in 1.x".

2. any change to the :term:`HTTP API` that is backward incompatible increments
the **MAJOR** number, and the differences are summarized at the begining of
the **MAJOR** number, and the differences are summarized at the beginning of
the documentation, a new document for that **MAJOR** version is created.

.. note::
Expand Down
12 changes: 6 additions & 6 deletions docs/community.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Get started!

Now you can make your changes locally.

6. When you're done making changes, check that your changes pass linting (requires python >= 3.6)::
6. When you're done making changes, check that your changes pass linting (requires Python >= 3.10)::

make lint

Expand All @@ -146,11 +146,11 @@ Get started!
Testing methodology
-------------------

The `tests are the specifications <http://blog.mathieu-leplatre.info/your-tests-as-your-specs.html>`_.
The tests are the specifications.

* Each test class represents a situation or feature (e.g. ``class AnonymousCreationTest(unittest.TestCase):``)
* Each test method represents an aspect of the specification (e.g. ``def test_creation_is_allowed_if_enabled_in_settings(self):``)
* Each test method is independant
* Each test method is independent
* The assertions should only correspond to the aspect of the specification that this method targets
* The ``setUp()`` method contains some initialization steps that are shared among the methods
* If the methods have different initialization steps, they should probably be split into different test classes
Expand Down Expand Up @@ -195,7 +195,7 @@ Hack core libraries
-------------------

If you want to run *Kinto* with some core libraries under development,
just install them from your local folder using ``pip``.
just install them from your local folder using ``uv pip``.

For example:

Expand All @@ -204,7 +204,7 @@ For example:
cd ..
git clone https://github.com/Kinto/kinto-attachment.git
cd kinto/
.venv/bin/pip install -e ../kinto-attachment/
uv pip install -e ../kinto-attachment/


Functional Tests
Expand Down Expand Up @@ -267,7 +267,7 @@ Step 1
Step 2
------

1. Create a release on Github on https://github.com/Kinto/kinto-attachment/releases/new
1. Create a release on Github on https://github.com/Kinto/kinto/releases/new
2. Create a new tag `X.Y.Z` (*This tag will be created from the target when you publish this release.*)
3. Generate release notes
4. Publish release
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The JSON can contain anything.

A **collection** is a group of records. Records are manipulated as a list
and can be filtered or sorted. Clients can obtain the list of changes that
occured on the collection records since a certain revision (e.g. *last synchronisation*).
occurred on the collection records since a certain revision (e.g. *last synchronisation*).
A JSON schema can optionally be defined on the collection.

A **bucket** is an abstract notion used to organize collections and their
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/good-practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ A client is automatically assigned a particular shard, depending for example:
It is currently not possible to setup the sharding directly from the kinto
settings, however it is already possible to set it up manually. [#]_

.. [#] http://www.craigkerstiens.com/2012/11/30/sharding-your-database/
.. [#] https://www.craigkerstiens.com/2012/11/30/sharding-your-database/


At the HTTP level
Expand Down Expand Up @@ -243,6 +243,6 @@ The right database node is chosen based on some elements of the data query
(most probably bucket or collection id) and partioning is then performed
automatically.

As an example, see `pgPool <http://www.pgpool.net/mediawiki/index.php/Main_Page>`_
As an example, see `pgPool <https://www.pgpool.net/mediawiki/index.php/Main_Page>`_
or `pgShard <https://github.com/citusdata/pg_shard>`_ for ways to shard a PostgreSQL
database.
8 changes: 4 additions & 4 deletions docs/configuration/production.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ On Debian / Ubuntu based systems::

$ sudo apt-get install libpq-dev

On RedHat / Fedora / Mint based systems::
On RedHat / Fedora based systems::

$ yum install postgresql-devel
$ dnf install postgresql-devel

On MacOS::

Expand Down Expand Up @@ -165,7 +165,7 @@ Recommended settings
Most default setting values in the application code base are suitable
for production.

Also, the set of settings mentionned below might deserve some review or
Also, the set of settings mentioned below might deserve some review or
adjustments:

.. code-block :: ini
Expand Down Expand Up @@ -422,7 +422,7 @@ Upgrading Kinto

Before upgrading, read the release notes about potential breaking changes.

See also ref:`API versioning <api-versioning>`.
See also :ref:`API versioning <api-versioning>`.

First, make the potential changes to the configuration file, as described in
the release notes.
Expand Down
2 changes: 1 addition & 1 deletion docs/core/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Glossary

object
objects
Also refered as «records», objects are stored by *Kinto-Core* resources.
Also referred to as «records», objects are stored by *Kinto-Core* resources.

tombstone
tombstones
Expand Down
29 changes: 12 additions & 17 deletions docs/core/rationale.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Rationale
*Kinto-Core* is a toolkit to ease the implementation of HTTP `microservices`_.
It is mainly focused on data-driven REST APIs (aka :term:`CRUD`).

.. _microservices: http://en.wikipedia.org/wiki/Microservices
.. _microservices: https://en.wikipedia.org/wiki/Microservices


Philosophy
Expand All @@ -28,7 +28,7 @@ expose a well defined HTTP API for:
practices (followed at `Mozilla Services`_ and `elsewhere`_).

.. _Mozilla Services: https://wiki.mozilla.org/CloudServices
.. _elsewhere: http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
.. _elsewhere: https://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api

The goal is to produce standardized APIs, which follow some
well known patterns, encouraging genericity in clients code [#]_.
Expand Down Expand Up @@ -117,13 +117,10 @@ A *Kinto-Core* application can change or force default values for any setting.
Built with Kinto-Core
=====================

Some applications in the wild built with *Kinto-Core*:
Some applications built with *Kinto-Core*:

* `Reading List <https://readinglist.readthedocs.io>`_, a service to synchronize articles between
devices;
* `Kinto <https://kinto.readthedocs.io>`_, a service to store and synchronize schema-less data.
* `Syncto <https://syncto.readthedocs.io>`_, a service to access *Firefox Sync* using *kinto.js*.
* *Please contact us to add yours*.
* *Please open an issue or PR to add yours*.

Any application built with *Kinto-Core*:

Expand All @@ -136,20 +133,18 @@ Any application built with *Kinto-Core*:
Similar projects
================

* `Python Eve <http://python-eve.org/>`_, built on Flask and MongoDB;
* *Please contact us to add more if any*.
* `Python Eve <https://docs.python-eve.org/>`_, a REST API framework built on Flask and MongoDB;
* *Please open an issue or PR to add more*.

Since the HTTP API is language independant and follows good HTTP/REST principles,
in the long term *Kinto-Core* should become only one among several server implementations.
Since the HTTP API is language-independent and follows good HTTP/REST principles,
*Kinto-Core* is designed to be only one among several possible server implementations.

.. note::

We encourage you to implement a clone of this project — using Node.js, Asyncio,
Go, Twisted, Django or anything else — following :ref:`the same HTTP API <kinto-api-endpoints>`!
We encourage you to implement a compatible server — using Node.js, asyncio,
Go, Django or anything else — following :ref:`the same HTTP API <kinto-api-endpoints>`!


.. [#] Switch from custom API to `JSON-API spec`_ is `being discussed`_.

.. _JSON-API spec: http://jsonapi.org/
.. _being discussed: https://github.com/mozilla-services/cliquet/issues/254
.. [#] A switch from the custom API to the `JSON-API spec <http://jsonapi.org/>`_ was discussed
but never pursued.

21 changes: 10 additions & 11 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Over the years, many great (and better!) alternatives were created with more fea
Why the name «Kinto»?
---------------------

«*Kinto-Un*» is the name of the `flying nimbus of San Goku <http://dragonball.wikia.com/wiki/Flying_Nimbus>`_.
«*Kinto-Un*» is the name of the `flying nimbus of Son Goku <https://dragonball.fandom.com/wiki/Flying_Nimbus>`_.
It is a small personal cloud, that flies at high speed and that you can share with
pure heart riders :)

Expand All @@ -62,8 +62,8 @@ Can I encrypt my data?
----------------------

Kinto server stores any data you pass to it, whether it's encrypted or not. We believe
encryption should always be done on the client-side, and we make it `easy to use encryption in our Kinto.js client
<https://mozilla-services.github.io/servicedenuages.fr/en/kinto-encryption-example>`_.
encryption should always be done on the client-side. The `kinto.js <https://github.com/Kinto/kinto.js>`_
client supports transparent client-side encryption before records are sent to the server.


Is there a package for my Operating System?
Expand All @@ -72,11 +72,11 @@ Is there a package for my Operating System?
No, but it's a great idea. Maintaining packages for several platforms is time-consuming
and we're a very small team.

Currently we make sure it's :ref:`easy to run with Docker or Python pip <install>`.
Currently we make sure it's :ref:`easy to run with Docker or Python (uv/pip) <install>`.


Why did you chose to use Python rather than X?
----------------------------------------------
Why did you choose to use Python rather than X?
------------------------------------------------

We love `Python <https://python.org>`_ because it's a concise & expressive
language with powerful data structures & easy to learn,
Expand Down Expand Up @@ -185,14 +185,13 @@ If you prefer MongoDB, RethinkDB or X, don't hesitate to start a storage, permis
cache backend, we'll be delighted to give you a hand!


Why did you chose to use Pyramid rather than X?
-----------------------------------------------
Why did you choose to use Pyramid rather than X?
-------------------------------------------------

Flask or Django Rest Framework could have been very good candidates!

We chose the Pyramid framework because we like `its flexibility and extensibility
<http://kinto.github.io/kinto-slides/2016.07.pybcn/index.html#slide25>`_.
Plus, we could :ref:`leverage Cornice helpers <technical-architecture>`, which
We chose the Pyramid framework because of its flexibility and extensibility.
We could also :ref:`leverage Cornice helpers <technical-architecture>`, which
bring HTTP best practices out-of-the-box.


Expand Down
4 changes: 2 additions & 2 deletions docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ We want to help developers focus on the frontend, and we don't want the challeng
of storing user data to get in their way. The path between a new idea and deploying to
production should be short!

Also, we believe data belong to the users, and not necessarily to the application authors.
Also, we believe data belongs to the users, and not necessarily to the application authors.
Applications should be decoupled from the storage location, and users should be
able to choose where their personal data are stored.

The backend can often be universal, generic and resuable. We envision mutualisation
The backend can often be universal, generic and reusable. We envision mutualisation
of services and self-hosting: the backend is deployed, secured and scaled
only once for several applications.

Expand Down
28 changes: 17 additions & 11 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,16 @@ By default, the PostgreSQL Debian package does not setup any password for the ``
...


bind(): No such file or directory [uwsgi error]
bind(): No such file or directory [uWSGI error]
===============================================

Make sure that the path you defined for the socket parameter of the uwsgi
.. note::

Kinto now uses `Granian <https://github.com/emmett-framework/granian>`_ as its
default WSGI server. The uWSGI-specific errors below only apply if you are still
using uWSGI explicitly.

Make sure that the path you defined for the socket parameter of the uWSGI
configuration exists.

To fix this::
Expand All @@ -88,11 +94,11 @@ Make sure the directory exists::

sudo mkdir -p /var/run/uwsgi

Also, make sure the user that runs uwsgi can access /var/run/uwsgi and can
write in the uwsgi directory.
Also, make sure the user that runs uWSGI can access ``/var/run/uwsgi`` and can
write to the directory.

ERROR: ImportError: No module named .... [uwsgi error]
=========================================================
ERROR: ImportError: No module named .... [uWSGI error]
=======================================================

You might get some error like::

Expand All @@ -108,9 +114,9 @@ You might get some error like::
ImportError: No module named cornice
unable to load app 0 (mountpoint='') (callable not found or import error)

The reason is that the user/group (``uid`` and ``gid`` specified under [uwsgi] section in kinto.ini) not being able to access the sourcecode.
The reason is that the user/group (``uid`` and ``gid`` specified under ``[uwsgi]`` in ``kinto.ini``) cannot access the source code.

To fix this, grant ``kinto`` user/group access to the source folder::
To fix this, grant the ``kinto`` user/group access to the source folder::

$ chgrp kinto -R .
$ chown kinto -R .
Expand Down Expand Up @@ -191,6 +197,6 @@ Here is an example of one such conflicting configuration::
multiauth.policy.auth0.userid_field = email

One simple solution is not to use Auth0 in conjunction with other auth policies
that overlaps with the ones it suppoprts (https://auth0.com/docs/identityproviders).
This is because Auth0 allows to fetch profile information from other providers creating
a conflict while choosing what policy should handle the access token.
that overlap with the ones it supports (https://auth0.com/docs/identityproviders).
This is because Auth0 allows fetching profile information from other providers, creating
a conflict when choosing which policy should handle the access token.
6 changes: 3 additions & 3 deletions docs/tutorials/first-steps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ The problem
===========

There are several kinds of applications where *Kinto* is
particulary relevant as a storage backend.
particularly relevant as a storage backend.

Let's say that we want to make a `TodoMVC <http://todomvc.com/>`_
Let's say that we want to make a `TodoMVC <https://todomvc.com/>`_
backend that will sync user tasks between the devices. The
requirements are that users can check off tasks as they complete them
and they can share their tasks with other users. We want tasks and
Expand All @@ -61,7 +61,7 @@ Account

Since we use internal accounts, we will start by creating one :)

Using the `httpie <http://httpie.org>`_ tool, it is as simple as:
Using the `httpie <https://httpie.io>`_ tool, it is as simple as:

.. code-block:: shell

Expand Down
20 changes: 10 additions & 10 deletions docs/tutorials/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you have `Docker <https://docker.com/>`_, *Kinto* can be started locally with

::

sudo docker run -p 8888:8888 kinto/kinto-server
docker run -p 8888:8888 kinto/kinto-server

The server should now be running on http://localhost:8888

Expand Down Expand Up @@ -70,7 +70,7 @@ config file:

.. code-block:: shell

sudo docker run -v `pwd`/config:/etc/kinto \
docker run -v `pwd`/config:/etc/kinto \
-e KINTO_INI=/etc/kinto/dev.ini \
-p 8888:8888 \
kinto/kinto-server
Expand All @@ -79,22 +79,22 @@ config file:
Using Docker Compose
--------------------

A sample configuration for `Docker Compose <http://docs.docker.com/compose/>`_
A sample configuration for `Docker Compose <https://docs.docker.com/compose/>`_
is provided in the Kinto repository. It pulls the *Kinto* container and runs it
with a *PostgreSQL* container.

::

wget https://raw.githubusercontent.com/Kinto/kinto/main/docker-compose.yml
sudo docker-compose up
docker compose up

Now you can:

- Stop the containers with ``docker-compose stop``.
- Start the containers with ``docker-compose up -d`` (``-d`` is for background/daemon).
- Connect to PostgreSQL service with ``docker-compose exec --user postgres db psql``.
- Install a plugin into kinto with ``docker-compose exec web pip3 install kinto-emailer``.
- Inspect the kinto config file with ``docker-compose exec web cat /etc/kinto/kinto.ini``.
- Stop the containers with ``docker compose stop``.
- Start the containers with ``docker compose up -d`` (``-d`` is for background/daemon).
- Connect to PostgreSQL service with ``docker compose exec --user postgres db psql``.
- Install a plugin into kinto with ``docker compose exec web pip3 install kinto-emailer``.
- Inspect the kinto config file with ``docker compose exec web cat /etc/kinto/kinto.ini``.

If you want to change the settings, you need to mount a custom settings file
into the *Kinto* container. Hopefully Docker Compose lets you do that the exact
Expand All @@ -116,7 +116,7 @@ same way Docker does (assuming you have created the config file ``./config/kinto
volumes:
- ./config:/etc/kinto

Note that with the above example,``config/kinto.ini`` must define the following options
Note that with the above example, ``config/kinto.ini`` must define the following options
(where ``postgres:postgres`` is the user/password you defined in ``docker-compose.yml``):

::
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/notifications-custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Kinto should load the listeners without errors:
Test it
'''''''

Create a bucket (using `HTTPie <http://httpie.org>`_):
Create a bucket (using `HTTPie <https://httpie.io>`_):

.. code-block:: shell

Expand Down
Loading