papermerge-core


Namepapermerge-core JSON
Version 2.1.5 PyPI version JSON
download
home_pagehttps://www.papermerge.com/
SummaryOpen source document management system for digital archives
upload_time2023-01-30 07:34:29
maintainerEugen Ciur
docs_urlNone
authorEugen Ciur
requires_python>=3.8,<3.11
licenseApache 2.0
keywords pdf ocr optical character recognition pdf/a scanning dms document-management paperless archives
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Tests](https://github.com/papermerge/papermerge-core/actions/workflows/tests.yml/badge.svg)](https://github.com/papermerge/papermerge-core/actions/workflows/tests.yml)

# 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
* ``papermerge.search`` - RESTful search. Supports four backends: [Xapian](https://getting-started-with-xapian.readthedocs.io/en/latest/),
  [Whoosh](https://whoosh.readthedocs.io/en/latest/intro.html), [Elasticsearch](https://github.com/elastic/elasticsearch),
  [Solr](https://solr.apache.org/).


## 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](https://github.com/ocrmypdf/OCRmyPDF))
* Full Text Search of the scanned documents (supports four search engine backends, uses [Xapian](https://getting-started-with-xapian.readthedocs.io/en/latest/) 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](https://github.com/pikepdf/pikepdf))


## Documentation

For an overview on REST API is available [here](https://docs.papermerge.io/REST%20API/index.html).

Detailed online REST API reference can be viewed as:

- [redoc](https://docs.papermerge.io/redoc/)
- [swagger](https://docs.papermerge.io/swagger-ui/)

Note that REST API reference documentation is generated from
OpenAPI schema. OpenAPI schema is stored in its own dedicated
repository [papermerge/openapi-schema](https://github.com/papermerge/openapi-schema).

Papermerge DMS documentation is available at [https://docs.papermerge.io](https://docs.papermerge.io/)

## Docker

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

    docker run -p 8000:8000 \
        -e PAPERMERGE__MAIN__SECRET_KEY=abc \
        -e DJANGO_SUPERUSER_PASSWORD=123 \
        papermerge/papermerge:latest


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

    docker run -p 8000:8000 \
        -e PAPERMERGE__MAIN__SECRET_KEY=abc \
        -e DJANGO_SUPERUSER_PASSWORD=123 \
        -e DJANGO_SUPERUSER_USERNAME=john \
        papermerge/papermerge:latest

For full list of supported environment variables check [online documentation](https://docs.papermerge.io/Settings/index.html).

## Docker Compose

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

    version: '3.7'
    services:
      app:
        image: papermerge/papermerge
        environment:
          - PAPERMERGE__MAIN__SECRET_KEY=abc
          - DJANGO_SUPERUSER_PASSWORD=12345
          - PAPERMERGE__DATABASE__TYPE=postgres
          - PAPERMERGE__DATABASE__USER=postgres
          - PAPERMERGE__DATABASE__PASSWORD=123
          - PAPERMERGE__DATABASE__NAME=postgres
          - PAPERMERGE__DATABASE__HOST=db
        ports:
          - 8000:8000
        depends_on:
          - db
      db:
        image: bitnami/postgresql:14.4.0
        volumes:
          - postgres_data:/var/lib/postgresql/data/
        environment:
          - POSTGRES_PASSWORD=123
    volumes:
        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](https://docs.papermerge.io/Installation/docker-compose.html#detailed-explanation)
section in online docs.

## Tests

Test suite is divided into two big groups:

1. tests.core
2. tests.search


First group is concerned with tests which do not depend on elasticsearch while
second one **tests.search** 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 `test.search` 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


## Linting

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

    poetry run task lint

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.papermerge.com/",
    "name": "papermerge-core",
    "maintainer": "Eugen Ciur",
    "docs_url": null,
    "requires_python": ">=3.8,<3.11",
    "maintainer_email": "eugen@papermerge.com",
    "keywords": "PDF,OCR,optical character recognition,PDF/A,scanning,dms,document-management,paperless,archives",
    "author": "Eugen Ciur",
    "author_email": "eugen@papermerge.com",
    "download_url": "https://files.pythonhosted.org/packages/b9/7a/8b1109a78059243b86b7fb983de249222e26cc6a684543e479b060bfc5c3/papermerge_core-2.1.5.tar.gz",
    "platform": null,
    "description": "[![Tests](https://github.com/papermerge/papermerge-core/actions/workflows/tests.yml/badge.svg)](https://github.com/papermerge/papermerge-core/actions/workflows/tests.yml)\n\n# Papermerge REST API Server\n\nThis python package is the heart of Papermerge project. It consists of a set\nof reusable Django apps which are consumed across different bundles of\nPapermerge Document Management System (DMS).\n\nTechnically speaking, it contains following Django apps:\n\n* ``papermerge.core`` - the epicenter of Papermerge DMS project\n* ``papermerge.notifications`` - Django Channels app for sending notifications via websockets\n* ``papermerge.search`` - RESTful search. Supports four backends: [Xapian](https://getting-started-with-xapian.readthedocs.io/en/latest/),\n  [Whoosh](https://whoosh.readthedocs.io/en/latest/intro.html), [Elasticsearch](https://github.com/elastic/elasticsearch),\n  [Solr](https://solr.apache.org/).\n\n\n## What is Papermerge?\n\nPapermerge is an open source document management system (DMS) primarily\ndesigned for archiving and retrieving your digital documents. Instead of\nhaving piles of paper documents all over your desk, office or drawers - you\ncan quickly scan them and configure your scanner to directly upload to\nPapermerge DMS. Papermerge DMS on its turn will extract text data from the\nscanned documents using Optical Character Recognition (OCR) technology the\nindex it and make it searchable. You will be able to quickly find any\n(scanned!) document using full text search capabilities.\n\nPapermerge is perfect tool to manage documents in PDF, JPEG, TIFF and PNG formats.\n\n## Features Highlights\n\n* OpenAPI compliant REST API\n* Works well with PDF documents\n* OCR (Optical Character Recognition) of the documents (uses [OCRmyPDF](https://github.com/ocrmypdf/OCRmyPDF))\n* Full Text Search of the scanned documents (supports four search engine backends, uses [Xapian](https://getting-started-with-xapian.readthedocs.io/en/latest/) by default)\n* Document Versions\n* Tags - assign colored tags to documents or folders\n* Documents and Folders - users can organize documents in folders\n* Multi-User (supports user groups)\n* User permissions management\n* Page Management - delete, reorder, cut & paste pages (uses [PikePDF](https://github.com/pikepdf/pikepdf))\n\n\n## Documentation\n\nFor an overview on REST API is available [here](https://docs.papermerge.io/REST%20API/index.html).\n\nDetailed online REST API reference can be viewed as:\n\n- [redoc](https://docs.papermerge.io/redoc/)\n- [swagger](https://docs.papermerge.io/swagger-ui/)\n\nNote that REST API reference documentation is generated from\nOpenAPI schema. OpenAPI schema is stored in its own dedicated\nrepository [papermerge/openapi-schema](https://github.com/papermerge/openapi-schema).\n\nPapermerge DMS documentation is available at [https://docs.papermerge.io](https://docs.papermerge.io/)\n\n## Docker\n\nIn order to start Papermerge REST API server as docker image use following command:\n\n    docker run -p 8000:8000 \\\n        -e PAPERMERGE__MAIN__SECRET_KEY=abc \\\n        -e DJANGO_SUPERUSER_PASSWORD=123 \\\n        papermerge/papermerge:latest\n\n\nIf you want initial superuser to have another username (e.g. john), use\n`DJANGO_SUPERUSER_USERNAME` environment variable:\n\n    docker run -p 8000:8000 \\\n        -e PAPERMERGE__MAIN__SECRET_KEY=abc \\\n        -e DJANGO_SUPERUSER_PASSWORD=123 \\\n        -e DJANGO_SUPERUSER_USERNAME=john \\\n        papermerge/papermerge:latest\n\nFor full list of supported environment variables check [online documentation](https://docs.papermerge.io/Settings/index.html).\n\n## Docker Compose\n\nBy default Papermerge REST API server uses sqlite3 database. In order to use PostgreSQL use following docker compose file:\n\n    version: '3.7'\n    services:\n      app:\n        image: papermerge/papermerge\n        environment:\n          - PAPERMERGE__MAIN__SECRET_KEY=abc\n          - DJANGO_SUPERUSER_PASSWORD=12345\n          - PAPERMERGE__DATABASE__TYPE=postgres\n          - PAPERMERGE__DATABASE__USER=postgres\n          - PAPERMERGE__DATABASE__PASSWORD=123\n          - PAPERMERGE__DATABASE__NAME=postgres\n          - PAPERMERGE__DATABASE__HOST=db\n        ports:\n          - 8000:8000\n        depends_on:\n          - db\n      db:\n        image: bitnami/postgresql:14.4.0\n        volumes:\n          - postgres_data:/var/lib/postgresql/data/\n        environment:\n          - POSTGRES_PASSWORD=123\n    volumes:\n        postgres_data:version: '3.7'\n\nAbove mentioned docker compose file can be used to start Papermerge REST API server which will use PostgreSQL database to store data.\n\nFor detailed description on how to start Papermerge DMS using docker compose read\n[Docker Compose/Detailed Explanation](https://docs.papermerge.io/Installation/docker-compose.html#detailed-explanation)\nsection in online docs.\n\n## Tests\n\nTest suite is divided into two big groups:\n\n1. tests.core\n2. tests.search\n\n\nFirst group is concerned with tests which do not depend on elasticsearch while\nsecond one **tests.search** is concerned with tests for which **depend on elasticsearch**\nand as result run very slow (hence the grouping). In\norder to run `tests.core` tests you need to have redis up and running; in\norder to run `test.search` you need to both **redis and elasticsearch** up and\nrunning.\n\nBefore running core tests suite, make sure redis service is up and running. Run tests:\n\n     poetry run task test-core\n\nBefore running search tests suite, make sure both **redis and elasticsearch**\nservices are up and running:\n\n     poetry run task test-search\n\nIn order to run all tests suite (core + search):\n\n    poetry run task test\n\n\n## Linting\n\nUse following command to make sure that your code is formatted per PEP8 spec:\n\n    poetry run task lint\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Open source document management system for digital archives",
    "version": "2.1.5",
    "split_keywords": [
        "pdf",
        "ocr",
        "optical character recognition",
        "pdf/a",
        "scanning",
        "dms",
        "document-management",
        "paperless",
        "archives"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f8b27ce58ac3a060cb10dabc1746b9708d0ba2fc60bbaaeebb1f14aa6f6e1018",
                "md5": "1db2ad380f10b9f1bd5b8d8c08d91004",
                "sha256": "ee3f7f053be8ab5c223caa81d2b2c1c54ffc697bb15ddbafc8cb20af02922bae"
            },
            "downloads": -1,
            "filename": "papermerge_core-2.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1db2ad380f10b9f1bd5b8d8c08d91004",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<3.11",
            "size": 138241,
            "upload_time": "2023-01-30T07:34:27",
            "upload_time_iso_8601": "2023-01-30T07:34:27.575485Z",
            "url": "https://files.pythonhosted.org/packages/f8/b2/7ce58ac3a060cb10dabc1746b9708d0ba2fc60bbaaeebb1f14aa6f6e1018/papermerge_core-2.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b97a8b1109a78059243b86b7fb983de249222e26cc6a684543e479b060bfc5c3",
                "md5": "0a46e57d7c7a61a24cb3e18b0854e5ce",
                "sha256": "906565692a426b8eaaf29b5736d530c94d3a835f7bec1b3775c1997acbd8b102"
            },
            "downloads": -1,
            "filename": "papermerge_core-2.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "0a46e57d7c7a61a24cb3e18b0854e5ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<3.11",
            "size": 98519,
            "upload_time": "2023-01-30T07:34:29",
            "upload_time_iso_8601": "2023-01-30T07:34:29.417888Z",
            "url": "https://files.pythonhosted.org/packages/b9/7a/8b1109a78059243b86b7fb983de249222e26cc6a684543e479b060bfc5c3/papermerge_core-2.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-30 07:34:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "papermerge-core"
}
        
Elapsed time: 0.03660s