Package: arklet
Arklet - A basic ARK resolverWhat is an ARK?Seehttps://arks.org/What is Arklet?Arklet is a Python Django application for minting, binding, and resolving ARKs.
It is intended to follow best practices set out byhttps://arks.org/.Technical design notes:Django is the only required dependency.Supports each Django and Python version that is itself supported by the maintainers (Python 3.7-3.10, Django 3.2.x-4.0.x).Tests are run against the upcoming versions of Python and Django as well.This repo can be run as a standalone service...or the ark package can be installed as a reusable app in other Django projects.If using the included arklet/settings.py file django-environ is also required.Arklet is database agnostic.Arklet is developed with poetry, pytest, black, tox, and more.RunningLocally with PostgresCreate the default.envfile in the project's root directory# /!\ Set your own secret key /!\
ARKLET_DJANGO_SECRET_KEY=[YOUR_SECRET]

# For local development, set to True
ARKLET_DEBUG=TrueThe following steps walk through running Postgres, installing with poetry, and starting
the app. You can omit any of the extras listed in the poetry install step if they are
not used in your deployment. The included arklet/settings.py file does require environ.
You can skip installing the development dependencies by passing--no-devto poetry.
Django is the only required dependency.cd path/to/project
mkdir postgres-data
docker run --name arklet-postgres -v postgres-data:/var/lib/postgresql/data \
    -p 5432:5432 \
    -e POSTGRES_USER=arklet -e POSTGRES_PASSWORD=arklet \
    -d postgres
poetry install --extras "postgres sentry environ"
poetry run python manage.py migrate
poetry run python manage.py createsuperuser
poetry run python manage.py runserverSeparate dockersUsing docker, we can use athis providedconfig file.See above for running PostgreSQL, and run theArkletdocker as follows (inbash):docker build \
    --target dev \
    -t "arklet" -f ./Dockerfile . \
    --build-arg ENV=DEV \
&& docker run --rm -it \
    -p 8000:8000 \
    --env-file=./docker/env.docker.local \
    -e ARKLETDEBUG="true" \
    --name arklet \
    -v `pwd`/ark:/app/ark \
    -v `pwd`/ark_import:/app/ark_import \
    -v `pwd`/arklet:/app/arklet \
    arkletWith docker-composeUsing the provideddocker-compose.ymlwith default settings in thedocker
configuration directory:docker-compose upBy default, the foldersark,ark_importandarkletare mounted in the
container. Should you wish to attach a console to thearkletcontainer (needed
to create the django superuser) :# In another shell
docker exec -it arklet_django /bin/bash
# You're now in the docker container
./manage.py createsuperuserFirst stepsCreate your first NAAN, Key, and Shoulder in the admin:
127.0.0.1:8000/adminAnd by the way, you now host a working ARK resolver! You can already
try the following ones :http://127.0.0.1:8000/ark:/13960/t5n960f7nhttp://127.0.0.1:8000/ark:/67375/C0X-SPWFRSGR-Nhttp://127.0.0.1:8000/ark:/12148/bpt6k65358454...Happy minting, binding, and resolving!Configuration OptionsSee arklet/settings.py for the full list of options to put in your config file.DeployingWith dockerUsing the provided Dockerfile (is you wish to set a build target, useprod,
but being the default target you can skip this), provide the following values
in your environment:ARKLET_DJANGO_SECRET_KEY=[YOUR_SECRET]ARKLET_DEBUG=FalseARKLET_HOST=0.0.0.0ARKLET_PORT=[Port of choice]ARKLET_POSTGRES_NAME=[DB NAME]ARKLET_POSTGRES_USER=[DB USER]ARKLET_POSTGRES_PASSWORD=[DB PASS]ARKLET_POSTGRES_HOST=[DB HOST]ARKLET_POSTGRES_PORT=[DB PORT]