balsam
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 0.1.0
- Package version: 0.0.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python >= 3.6
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import balsam
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import balsam
Getting Started
Please follow the installation procedure and then run the following:
import time
import balsam
from pprint import pprint
from balsam.api import apps_api
from balsam.model.app_create import AppCreate
from balsam.model.app_out import AppOut
from balsam.model.app_update import AppUpdate
from balsam.model.http_validation_error import HTTPValidationError
from balsam.model.paginated_apps_out import PaginatedAppsOut
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = balsam.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure OAuth2 access token for authorization: OAuth2PasswordBearer
configuration = balsam.Configuration(
host = "http://localhost"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with balsam.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = apps_api.AppsApi(api_client)
app_create = AppCreate(
site_id=3,
name="NWChemGeomOpt",
serialized_class="serialized_class_example",
source_code="source_code_example",
description="NWChem7 geometry optimizer",
parameters={
"key": AppParameter(
required=True,
default="default_example",
help="",
),
},
transfers={
"key": TransferSlot(
required=True,
direction=BalsamSchemasAppsTransferDirection("in"),
local_path="local_path_example",
description="",
recursive=False,
),
},
) # AppCreate |
try:
# Create
api_response = api_instance.create_apps_post(app_create)
pprint(api_response)
except balsam.ApiException as e:
print("Exception when calling AppsApi->create_apps_post: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
AppsApi | create_apps_post | POST /apps/ | Create |
AppsApi | delete_apps_app_id_delete | DELETE /apps/{app_id} | Delete |
AppsApi | list_apps_get | GET /apps/ | List |
AppsApi | read_apps_app_id_get | GET /apps/{app_id} | Read |
AppsApi | update_apps_app_id_put | PUT /apps/{app_id} | Update |
AuthApi | get_auth_methods_auth_how_get | GET /auth/how | Get Auth Methods |
AuthApi | login_auth_password_login_post | POST /auth/password/login | Login |
AuthApi | profile_auth_password_me_get | GET /auth/password/me | Profile |
AuthApi | register_auth_password_register_post | POST /auth/password/register | Register |
BatchJobsApi | bulk_update_batch_jobs_patch | PATCH /batch-jobs/ | Bulk Update |
BatchJobsApi | create_batch_jobs_post | POST /batch-jobs/ | Create |
BatchJobsApi | delete_batch_jobs_batch_job_id_delete | DELETE /batch-jobs/{batch_job_id} | Delete |
BatchJobsApi | list_batch_jobs_get | GET /batch-jobs/ | List |
BatchJobsApi | read_batch_jobs_batch_job_id_get | GET /batch-jobs/{batch_job_id} | Read |
BatchJobsApi | update_batch_jobs_batch_job_id_put | PUT /batch-jobs/{batch_job_id} | Update |
EventsApi | list_events_get | GET /events/ | List |
JobsApi | bulk_create_jobs_post | POST /jobs/ | Bulk Create |
JobsApi | bulk_update_jobs_patch | PATCH /jobs/ | Bulk Update |
JobsApi | delete_jobs_job_id_delete | DELETE /jobs/{job_id} | Delete |
JobsApi | list_jobs_get | GET /jobs/ | List |
JobsApi | query_delete_jobs_delete | DELETE /jobs/ | Query Delete |
JobsApi | query_update_jobs_put | PUT /jobs/ | Query Update |
JobsApi | read_jobs_job_id_get | GET /jobs/{job_id} | Read |
JobsApi | update_jobs_job_id_put | PUT /jobs/{job_id} | Update |
SessionsApi | acquire_sessions_session_id_post | POST /sessions/{session_id} | Acquire |
SessionsApi | create_sessions_post | POST /sessions/ | Create |
SessionsApi | delete_sessions_session_id_delete | DELETE /sessions/{session_id} | Delete |
SessionsApi | list_sessions_get | GET /sessions/ | List |
SessionsApi | tick_sessions_session_id_put | PUT /sessions/{session_id} | Tick |
SitesApi | create_sites_post | POST /sites/ | Create |
SitesApi | delete_sites_site_id_delete | DELETE /sites/{site_id} | Delete |
SitesApi | list_sites_get | GET /sites/ | List |
SitesApi | read_sites_site_id_get | GET /sites/{site_id} | Read |
SitesApi | update_sites_site_id_put | PUT /sites/{site_id} | Update |
TransfersApi | bulk_update_transfers_patch | PATCH /transfers/ | Bulk Update |
TransfersApi | list_transfers_get | GET /transfers/ | List |
TransfersApi | read_transfers_transfer_id_get | GET /transfers/{transfer_id} | Read |
TransfersApi | update_transfers_transfer_id_put | PUT /transfers/{transfer_id} | Update |
Documentation For Models
- AllowedQueue
- AppCreate
- AppOut
- AppParameter
- AppUpdate
- BalsamSchemasAppsTransferDirection
- BalsamSchemasTransferTransferDirection
- BatchJobBulkUpdate
- BatchJobCreate
- BatchJobOrdering
- BatchJobOut
- BatchJobPartition
- BatchJobState
- BatchJobUpdate
- EventOrdering
- HTTPValidationError
- JobBulkUpdate
- JobMode
- JobOrdering
- JobState
- JobTransferItem
- JobUpdate
- LogEventOut
- PaginatedAppsOut
- PaginatedBatchJobOut
- PaginatedLogEventOut
- PaginatedSessionsOut
- PaginatedSitesOut
- PaginatedTransferItemOut
- SchedulerBackfillWindow
- SchedulerJobStatus
- ServerJobCreate
- SessionAcquire
- SessionCreate
- SessionOut
- SiteCreate
- SiteOut
- SiteUpdate
- TransferItemBulkUpdate
- TransferItemOut
- TransferItemState
- TransferItemUpdate
- TransferSlot
- UserCreate
- UserOut
- ValidationError
Documentation For Authorization
OAuth2PasswordBearer
- Type: OAuth
- Flow: password
- Authorization URL:
- Scopes: N/A
Author
Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in balsam.apis and balsam.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
Solution 1: Use specific imports for apis and models like:
from balsam.api.default_api import DefaultApi
from balsam.model.pet import Pet
Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:
import sys
sys.setrecursionlimit(1500)
import balsam
from balsam.apis import *
from balsam.models import *