Skip to content

Commit

Permalink
generated client for current openapi.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed May 30, 2024
1 parent ffc0e8f commit 3836186
Show file tree
Hide file tree
Showing 71 changed files with 12,193 additions and 13 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# NOTE: This file is auto generated by OpenAPI Generator.
# URL: https://openapi-generator.tech
#
# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: vcell_api_client Python package

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
venv/
.venv/
.python-version
.pytest_cache

# Translations
*.mo
Expand All @@ -73,7 +76,7 @@ docs/_build/
# PyBuilder
target/

# Jupyter Notebook
#Ipython Notebook
.ipynb_checkpoints

# pyenv
Expand Down Expand Up @@ -112,3 +115,7 @@ ENV/

# mkdocs build dir
site/

.gitlab-ci.yml

.travis.yml
23 changes: 23 additions & 0 deletions .openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
54 changes: 54 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.github/workflows/python.yml
.gitignore
.gitlab-ci.yml
.travis.yml
README.md
docs/AccesTokenRepresentationRecord.md
docs/AdminResourceApi.md
docs/BioModel.md
docs/BioModelResourceApi.md
docs/BiomodelRef.md
docs/HelloWorldApi.md
docs/HelloWorldMessage.md
docs/Identity.md
docs/MathmodelRef.md
docs/Publication.md
docs/PublicationResourceApi.md
docs/Simulation.md
docs/UserIdentityJSONSafe.md
docs/UserLoginInfoForMapping.md
docs/UserRegistrationInfo.md
docs/UsersResourceApi.md
git_push.sh
pyproject.toml
requirements.txt
setup.cfg
setup.py
test-requirements.txt
test/__init__.py
tox.ini
vcell_api_client/__init__.py
vcell_api_client/api/__init__.py
vcell_api_client/api/admin_resource_api.py
vcell_api_client/api/bio_model_resource_api.py
vcell_api_client/api/hello_world_api.py
vcell_api_client/api/publication_resource_api.py
vcell_api_client/api/users_resource_api.py
vcell_api_client/api_client.py
vcell_api_client/api_response.py
vcell_api_client/configuration.py
vcell_api_client/exceptions.py
vcell_api_client/models/__init__.py
vcell_api_client/models/acces_token_representation_record.py
vcell_api_client/models/bio_model.py
vcell_api_client/models/biomodel_ref.py
vcell_api_client/models/hello_world_message.py
vcell_api_client/models/identity.py
vcell_api_client/models/mathmodel_ref.py
vcell_api_client/models/publication.py
vcell_api_client/models/simulation.py
vcell_api_client/models/user_identity_json_safe.py
vcell_api_client/models/user_login_info_for_mapping.py
vcell_api_client/models/user_registration_info.py
vcell_api_client/py.typed
vcell_api_client/rest.py
1 change: 1 addition & 0 deletions .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.1.0
140 changes: 140 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,143 @@ Client library to connect to VCell remote API
## Credits

This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [waynerv/cookiecutter-pypackage](https://github.com/waynerv/cookiecutter-pypackage) project template.

## Background

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.1
- Package version: 0.1.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [http://exampleurl.com/contact](http://exampleurl.com/contact)

## Requirements.

Python 3.9+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
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:
```python
import vcell_api_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import vcell_api_client
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import time
import vcell_api_client
from vcell_api_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://vcellapi-test.cam.uchc.edu
# See configuration.py for a list of all supported configuration parameters.
configuration = vcell_api_client.Configuration(
host = "https://vcellapi-test.cam.uchc.edu"
)

# 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.


# Enter a context with an instance of the API client
with vcell_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = vcell_api_client.AdminResourceApi(api_client)

try:
# Get usage summary
api_response = api_instance.get_usage()
print("The response of AdminResourceApi->get_usage:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminResourceApi->get_usage: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://vcellapi-test.cam.uchc.edu*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AdminResourceApi* | [**get_usage**](docs/AdminResourceApi.md#get_usage) | **GET** /api/v1/admin/usage | Get usage summary
*BioModelResourceApi* | [**delete_bio_model**](docs/BioModelResourceApi.md#delete_bio_model) | **DELETE** /api/v1/bioModel/{bioModelID} | Delete the BioModel from VCell's database.
*BioModelResourceApi* | [**get_biomodel_by_id**](docs/BioModelResourceApi.md#get_biomodel_by_id) | **GET** /api/v1/bioModel/{bioModelID} | Get BioModel information in JSON format by ID.
*BioModelResourceApi* | [**upload_bio_model**](docs/BioModelResourceApi.md#upload_bio_model) | **POST** /api/v1/bioModel/upload_bioModel | Upload the BioModel to VCell database. Returns BioModel ID.
*HelloWorldApi* | [**get_hello_world**](docs/HelloWorldApi.md#get_hello_world) | **GET** /api/v1/helloworld | Get hello world message.
*PublicationResourceApi* | [**create_publication**](docs/PublicationResourceApi.md#create_publication) | **POST** /api/v1/publications | Create publication
*PublicationResourceApi* | [**delete_publication**](docs/PublicationResourceApi.md#delete_publication) | **DELETE** /api/v1/publications/{id} | Delete publication
*PublicationResourceApi* | [**get_publication_by_id**](docs/PublicationResourceApi.md#get_publication_by_id) | **GET** /api/v1/publications/{id} | Get publication by ID
*PublicationResourceApi* | [**get_publications**](docs/PublicationResourceApi.md#get_publications) | **GET** /api/v1/publications | Get all publications
*PublicationResourceApi* | [**update_publication**](docs/PublicationResourceApi.md#update_publication) | **PUT** /api/v1/publications | Create publication
*UsersResourceApi* | [**forgot_legacy_password**](docs/UsersResourceApi.md#forgot_legacy_password) | **POST** /api/v1/users/forgotLegacyPassword | The end user has forgotten the legacy password they used for VCell, so they will be emailed it.
*UsersResourceApi* | [**get_legacy_api_token**](docs/UsersResourceApi.md#get_legacy_api_token) | **POST** /api/v1/users/bearerToken | Get token for legacy API
*UsersResourceApi* | [**get_mapped_user**](docs/UsersResourceApi.md#get_mapped_user) | **GET** /api/v1/users/mappedUser | Get mapped VCell identity
*UsersResourceApi* | [**get_me**](docs/UsersResourceApi.md#get_me) | **GET** /api/v1/users/me | Get current user
*UsersResourceApi* | [**map_new_user**](docs/UsersResourceApi.md#map_new_user) | **POST** /api/v1/users/newUser | create vcell user
*UsersResourceApi* | [**map_user**](docs/UsersResourceApi.md#map_user) | **POST** /api/v1/users/mapUser | map vcell user
*UsersResourceApi* | [**unmap_user**](docs/UsersResourceApi.md#unmap_user) | **PUT** /api/v1/users/unmapUser/{userName} | remove vcell identity mapping


## Documentation For Models

- [AccesTokenRepresentationRecord](docs/AccesTokenRepresentationRecord.md)
- [BioModel](docs/BioModel.md)
- [BiomodelRef](docs/BiomodelRef.md)
- [HelloWorldMessage](docs/HelloWorldMessage.md)
- [Identity](docs/Identity.md)
- [MathmodelRef](docs/MathmodelRef.md)
- [Publication](docs/Publication.md)
- [Simulation](docs/Simulation.md)
- [UserIdentityJSONSafe](docs/UserIdentityJSONSafe.md)
- [UserLoginInfoForMapping](docs/UserLoginInfoForMapping.md)
- [UserRegistrationInfo](docs/UserRegistrationInfo.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="openId"></a>
### openId



## Author

[email protected]


32 changes: 32 additions & 0 deletions docs/AccesTokenRepresentationRecord.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# AccesTokenRepresentationRecord


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **str** | | [optional]
**creation_date_seconds** | **int** | | [optional]
**expire_date_seconds** | **int** | | [optional]
**user_id** | **str** | | [optional]
**user_key** | **str** | | [optional]

## Example

```python
from vcell_api_client.models.acces_token_representation_record import AccesTokenRepresentationRecord

# TODO update the JSON string below
json = "{}"
# create an instance of AccesTokenRepresentationRecord from a JSON string
acces_token_representation_record_instance = AccesTokenRepresentationRecord.from_json(json)
# print the JSON string representation of the object
print AccesTokenRepresentationRecord.to_json()

# convert the object into a dict
acces_token_representation_record_dict = acces_token_representation_record_instance.to_dict()
# create an instance of AccesTokenRepresentationRecord from a dict
acces_token_representation_record_form_dict = acces_token_representation_record.from_dict(acces_token_representation_record_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit 3836186

Please sign in to comment.