A simple Django package to build web-based Indy/Aries agent applications.
Project description
Aries Community is a simple Django framework for building Hyperledger Indy/Aries Agent enabled web applications. Detailed documentation is in the “docs” directory.
Please see https://github.com/AnonSolutions/django-aries-community for detailed docmentation
Quick start
You can find a basic Aries Community application here https://github.com/AnonSolutions/aries-community-demo
To add aries_community to your own django application:
Copy the requirements.txt file into your application directory and install requirements
Add “aries_community” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...
'aries_community',
]
Add the following Indy configuration settings (this is for a local install):
import platform
def file_ext():
if platform.system() == 'Linux':
return '.so'
elif platform.system() == 'Darwin':
return '.dylib'
elif platform.system() == 'Windows':
return '.dll'
else:
return '.so'
ARIES_CONFIG = {
'storage_config': {'url': 'localhost:5432'},
'storage_credentials': {'account': 'postgres', 'password': 'mysecretpassword', 'admin_account': 'postgres', 'admin_password': 'mysecretpassword'},
'register_dids': True,
'ledger_url': 'http://localhost:9000',
'genesis_url': 'http://localhost:9000/genesis',
'default_enterprise_seed': 'aries_community_enterprise_00000',
'default_institution_seed': 'aries_community_institution_0000',
'managed_agent_host': 'localhost',
'webhook_host': 'localhost',
'webhook_port': '8000',
}
Ensure your local templates are loaded first:
TEMPLATES = [
{
...
'DIRS': [
os.path.join(BASE_DIR, '<your app>/templates'),
],
...
},
]
Override User, Organization and Relationship models, if you have your own subclass of these models:
AUTH_USER_MODEL = 'aries_community.IndyUser'
ARIES_ORGANIZATION_MODEL = 'aries_community.IndyOrganization'
ARIES_ORG_RELATION_MODEL = 'aries_community.IndyOrgRelationship'
Include the indy URLconf in your project urls.py like this:
path('aries/', include('aries_community.urls')),
Ensure you have all pre-requisites running, as per django-aries-community docs
Run python manage.py migrate to create the indy models.
Run python manage.py runserver and connect to http://localhost:8000/
You can customize the UI and add event handling for Aries Connection and Messaging events. See the demos in https://github.com/AnonSolutions/aries-community-demo for examples of how to do this.
View detailed documentation in the Docs directory (https://github.com/AnonSolutions/django-aries-community)
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
Built Distribution
Hashes for django-aries-community-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9494931df1b0e7e7356ab84706d0e6016a57ce615a1f6f935c04278c0536f61 |
|
MD5 | 2ce2f59691223bce4e0a62dcdd975390 |
|
BLAKE2b-256 | eaaf68f37a052e1d6f2b1ddca41d070b7846d6e58db69821bf4497c6a0866d3c |
Hashes for django_aries_community-0.1.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f11381b1e48b1cddb09af26934b26504b8508d8f5aa5ffa12ba6e07c8de5d946 |
|
MD5 | 9de2b91ba1de494293ba7d19c990f2e8 |
|
BLAKE2b-256 | 088ed8ef428aae928712fb47c48f6ac15ebe3894bf3fd6e673dce407ac68f501 |