Metadata-Version: 2.3
Name: tacc_pytram
Version: 0.2.0
Summary: A Python library to interact with TACC's TRAM API
Author: TACC-WMA
Author-email: TACC-WMA <wma-portals@tacc.utexas.edu>
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.14.3
Requires-Dist: requests>=2.34.2
Requires-Python: >=3.15
Project-URL: Homepage, https://github.com/TACC/PyTRAM
Project-URL: Issues, https://github.com/TACC/PyTRAM/issues
Description-Content-Type: text/markdown

Replacement library for PyTAS, now using the new TACC TRAM.

This consists of the client and a folder of services functions that use the client for credentials etc.

Build using:

```
uv build
```

Github workflow has been set up to automatically build and publish to testpypi on commit and pypi on new release.

Example code calls (subject to change):

```python
from tacc_pytram.tramclient import TRAMClient
from tacc_pytram.services import accounts_service
 
# test url and key available on 1password, WMA Infra "TRAM Test URL and Key"
tram_client = TRAMClient(baseURL=<base_url>, api_key=<secret key>)
 
user = accounts_service.get_profile(tram_client=tram_client, username="cmarnold")
 
print("testing get profile with cmarnold")
print(user)
 
history = accounts_service.get_history(tram_client=tram_client, username="cmarnold")
 
print("testing get history with cmarnold")
print(history)
 
allocations = accounts_service.get_allocations(tram_client=tram_client, username="cmarnold")
 
print("testing get allocations with cmarnold, default is active")
print(allocations)
 
 
allocations = accounts_service.get_allocations(tram_client=tram_client, username="cmarnold", active=False)
 
print("testing get allocations with cmarnold, setting active to false")
print(allocations)
 
projects = accounts_service.get_projects(tram_client=tram_client, username="cmarnold")
 
print("testing get projects with cmarnold")
print(projects)
 
account = accounts_service.get_account(tram_client=tram_client, username="cmarnold")
 
print("testing get account with cmarnold")
print(account)
```
