Skip to main content

OpenAcct is a pluggable Django app for managing research computing center project accounting.

It is intended to provide a flexible, scheduler-agnostic alternative to other Allocation and Account Management Database tools like Gold, Moab Account Manager, and the SlurmDBD. OpenAcct allows for definition of multiple Services per System, each with their own units of resource consumption and charge rates. Charging is managed through Transactions, which bind an amount of a Service’s resources consumed with an Account responsible for any charges incurred by that consumption. Transaction objects can be individually tracked, selectively charged, and refunded when needed to maintain an event-based history of account activity.

Installation

django-openacct can be installed from PyPI, and requires no external dependencies aside from Django.

?> pip install django-openacct

Quick Start

The following shows a small setup script being piped into the Django shell interpreter:

?> cat openacct_example.py

from openacct.models    import *
from openacct.shortcuts import *

# Create a System and Service for a cluster
cluster = System.objects.create(name='cluster', description='A Cluster')
service = Service.objects.create(
    name='cluster-core-hours', units='core-hours', system=cluster,
    charge_rate=0.05, description='CPU core usage * wallclock hours'
)

# Create Users
bob = User.objects.create(name='bob')
sue = User.objects.create(name='sue')
tux = User.objects.create(name='tux')

# Create Projects and grant access to the cluster's service
phys = create_project('phys', pi=bob, description='Physics Dept')
chem = create_project('chem', pi=sue, description='Chemsitry Dept')
grant_service_access(service, project=phys)
grant_service_access(service, project=chem)

# Add a user to the projects
add_user_to_project(tux, chem)
add_user_to_project('tux', 'phys')


?> ./manage.py shell < openacct_example.py

This example shows a basic setup for a center, with a single compute resource which is charged on a per core-hour basis. Several users and two projects, one for a Physics Department, and another for a Chemistry Department, are created.

Access to use a service is managed through Accounts, which are being implicitly created for each project. When passing the project parameter to grant_service_access, all active accounts are granted the same access. Accounts can be created explicitly and granted access individually when desired.

Finally, the user tux is added to both of the created projects, demonstrating how the shortcut functions will accept both the name of an object or the object itself for all parameters referencing one of the models in the schema.

With this setup in place, job records could be added to the database as Job objects, with Transactions making use of the cluster-core-hour service linked to them.

Metadata

Release files for django-openacct 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-openacct 0.0.5
File Size Uploaded Provenance
django-openacct-0.0.5.tar.gz 12.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-openacct 0.0.5
File Interpreter ABI Platform
django_openacct-0.0.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 28.1 kB

Release files / django-openacct-0.0.5.tar.gz

Download URL django-openacct-0.0.5.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1e5bf020d0844086ab94440b883d2dfecd0fb844116dc4316bd5d623c8adaad9
BLAKE2b-256 checksum
How to use checksums
b83254b2ff57dbb45e2270258e4a38b085824f467b0ca286eb0349b5d91951ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8

Release files / django_openacct-0.0.5-py2.py3-none-any.whl

Download URL django_openacct-0.0.5-py2.py3-none-any.whl
Size 15.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
53118850b4a1643222c9d97b7a9ca90a0c1e506163ec72f40a41d4d1cb6d7a38
BLAKE2b-256 checksum
How to use checksums
246e62a524334bb08551061f10c680853257fe7a063c9927adcaf5fffb5a3649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8

Security for django-openacct 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page