Skip to main content

Document management service

Project description

alexandria

Build Status Coverage Black License: GPL-3.0-or-later

Our goal is to implement an external document management service to hold and provide uploaded documents. Documents can be uploaded and, depending on user access, managed by internal as well as external users.

The goal is NOT to re implement a complex DMS but rather to have a simple and user-friendly way of managing documents with different permissions.

All User Interface interactions should be as simple as possible and easily understandable.

Original RFC that led to alexandria

Getting started

Installation

Requirements

  • docker
  • docker-compose

After installing and configuring those, download docker-compose.yml and run the following commands:

# only needs to be run once
echo UID=$UID > .env

docker compose up -d

You can now access the api at http://localhost:8000/api/v1/.

Example data

To load a set of categories run the following command:

make load_example_data

Configuration

Document Merge Service is a 12factor app which means that configuration is stored in environment variables. Different environment variable types are explained at django-environ.

Common

A list of configuration options which you need

  • Django configuration
    • SECRET_KEY: A secret key used for cryptography. This needs to be a random string of a certain length. See more.
    • ALLOWED_HOSTS: A list of hosts/domains your service will be served from. See more.
    • DATABASE_ENGINE: Database backend to use. See more. (default: django.db.backends.postgresql)
    • DATABASE_HOST: Host to use when connecting to database (default: localhost)
    • DATABASE_PORT: Port to use when connecting to database (default: 5432)
    • DATABASE_NAME: Name of database to use (default: alexandria)
    • DATABASE_USER: Username to use when connecting to the database (default: alexandria)
    • DATABASE_PASSWORD: Password to use when connecting to database
  • Authentication configuration
    • OIDC_OP_USER_ENDPOINT: Userinfo endpoint for OIDC
    • OIDC_VERIFY_SSL: Set to false if you want to disable verifying SSL certs. Useful for development
    • OIDC_DRF_AUTH_BACKEND: Overwrite the default authentication backend with your own
    • ALEXANDRIA_OIDC_USER_FACTORY: Overwrite the default user with your own
    • ALEXANDRIA_CREATED_BY_USER_PROPERTY: Overwrite the default user property which is used for ..._by_user (default: username)
    • ALEXANDRIA_CREATED_BY_GROUP_PROPERTY: Overwrite the default group property which is used for ..._by_group (default: group)
  • Authorization configurations
    • ALEXANDRIA_VISIBILITY_CLASSES: Comma-separated list of classes that define visibility for all models
    • ALEXANDRIA_PERMISSION_CLASSES: Comma-separated list of classes that define permissions for all models
  • Data validation configuration
    • ALEXANDRIA_VALIDATION_CLASSES: Comma-separated list of classes that define custom validations
  • Thumbnail configuration (optional)
    • ALEXANDRIA_ENABLE_THUMBNAIL_GENERATION: Set to false to disable thumbnail generation
      • Check the docker-compose file for an example on how to set up generation with s3 hooks
    • ALEXANDRIA_THUMBNAIL_WIDTH: Width of generated thumbnails
    • ALEXANDRIA_THUMBNAIL_HEIGHT: Height of generated thumbnails

For development, you can also set the following environemnt variables to help you:

  • ALEXANDRIA_DEV_AUTH_BACKEND: Set this to "true" to enable a fake auth backend that simulates an authenticated user. Requires DEBUG to be set to True as well.
  • DEBUG: Set this to true for debugging during development. Never enable this in production, as it will leak information to the public if you do.

Contributing

Look at our contributing guidelines to start with your first contribution.

Maintainer's Handbook

Some notes for maintaining this project can be found in the maintainer's handbook.

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

caluma_alexandria-2.2.1.tar.gz (40.7 kB view details)

Uploaded Source

Built Distribution

caluma_alexandria-2.2.1-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

Details for the file caluma_alexandria-2.2.1.tar.gz.

File metadata

  • Download URL: caluma_alexandria-2.2.1.tar.gz
  • Upload date:
  • Size: 40.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.17

File hashes

Hashes for caluma_alexandria-2.2.1.tar.gz
Algorithm Hash digest
SHA256 e3a07e5282f4137dafc4cdcf0c764ea926b3add0b7227bf47b375b09ef96b51a
MD5 67879dbd77e6a838fd433eba6a6e9ae9
BLAKE2b-256 59f9129a85882f3479c7984d2f47eff8a9e35cbacd06c13eac3c8d5fc6ff1ff8

See more details on using hashes here.

File details

Details for the file caluma_alexandria-2.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for caluma_alexandria-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51d6da4a432448a8d23d0359dddd7ec1041905141572e281d4fa1c0be9c2f323
MD5 b881277a8f3a8a8698305642b32c04a2
BLAKE2b-256 ab8487d89e3ce4f1bd77625dec9badfebe245f775de45140c4a4985c2fc8464c

See more details on using hashes here.

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