Skip to main content

Open source document management system for digital archives

Project description


Papermerge REST API Server

This python package is the heart of Papermerge project. It consists of a set of reusable Django apps which are consumed across different bundles of Papermerge Document Management System (DMS).

Technically speaking, it contains following Django apps:

  • papermerge.core - the epicenter of Papermerge DMS project
  • papermerge.notifications - Django Channels app for sending notifications via websockets
  • - RESTful search. Supports four backends: Xapian, Whoosh, Elasticsearch, Solr.

What is Papermerge?

Papermerge is an open source document management system (DMS) primarily designed for archiving and retrieving your digital documents. Instead of having piles of paper documents all over your desk, office or drawers - you can quickly scan them and configure your scanner to directly upload to Papermerge DMS. Papermerge DMS on its turn will extract text data from the scanned documents using Optical Character Recognition (OCR) technology the index it and make it searchable. You will be able to quickly find any (scanned!) document using full text search capabilities.

Papermerge is perfect tool to manage documents in PDF, JPEG, TIFF and PNG formats.

Features Highlights

  • OpenAPI compliant REST API
  • Works well with PDF documents
  • OCR (Optical Character Recognition) of the documents (uses OCRmyPDF)
  • Full Text Search of the scanned documents (supports four search engine backends, uses Xapian by default)
  • Document Versions
  • Tags - assign colored tags to documents or folders
  • Documents and Folders - users can organize documents in folders
  • Multi-User (supports user groups)
  • User permissions management
  • Page Management - delete, reorder, cut & paste pages (uses PikePDF)


For an overview on REST API is available here.

Detailed online REST API reference can be viewed as:

Note that REST API reference documentation is generated from OpenAPI schema. OpenAPI schema is stored in its own dedicated repository papermerge/openapi-schema.

Papermerge DMS documentation is available at


In order to start Papermerge REST API server as docker image use following command:

docker run -p 8000:8000 \

If you want initial superuser to have another username (e.g. john), use DJANGO_SUPERUSER_USERNAME environment variable:

docker run -p 8000:8000 \

For full list of supported environment variables check online documentation.

Docker Compose

By default Papermerge REST API server uses sqlite3 database. In order to use PostgreSQL use following docker compose file:

version: '3.7'
    image: papermerge/papermerge
      - 8000:8000
      - db
    image: bitnami/postgresql:14.4.0
      - postgres_data:/var/lib/postgresql/data/
    postgres_data:version: '3.7'

Above mentioned docker compose file can be used to start Papermerge REST API server which will use PostgreSQL database to store data.

For detailed description on how to start Papermerge DMS using docker compose read Docker Compose/Detailed Explanation section in online docs.


Test suite is divided into two big groups:

  1. tests.core

First group is concerned with tests which do not depend on elasticsearch while second one is concerned with tests for which depend on elasticsearch and as result run very slow (hence the grouping). In order to run tests.core tests you need to have redis up and running; in order to run you need to both redis and elasticsearch up and running.

Before running core tests suite, make sure redis service is up and running. Run tests:

 poetry run task test-core

Before running search tests suite, make sure both redis and elasticsearch services are up and running:

 poetry run task test-search

In order to run all tests suite (core + search):

poetry run task test


Use following command to make sure that your code is formatted per PEP8 spec:

poetry run task lint

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

papermerge_core-2.1.5.tar.gz (98.5 kB view hashes)

Uploaded source

Built Distribution

papermerge_core-2.1.5-py3-none-any.whl (138.2 kB view hashes)

Uploaded py3

Supported by

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