Metadata-Version: 2.4
Name: access_server_connector_v2
Version: 1.0.0+2631583200
Summary: Mentortools Access Server
Home-page: 
Author: OpenAPI Generator community
Author-email: OpenAPI Generator Community <team@openapitools.org>
Project-URL: Repository, https://github.com/GIT_USER_ID/GIT_REPO_ID
Keywords: OpenAPI,OpenAPI-Generator,Mentortools Access Server
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: aiohttp>=3.8.4
Requires-Dist: aiohttp-retry>=2.8.3
Requires-Dist: pydantic>=2.11
Requires-Dist: typing-extensions>=4.7.1
Dynamic: author

# access-server-connector-v2
Mentortools service for Access Packages with lazy access resolution

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

- API version: 0.1.0
- Package version: 1.0.0+2631583200
- Generator version: 7.23.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.10+

## 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 access_server_connector_v2
```

### 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 access_server_connector_v2
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

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

```python

import access_server_connector_v2
from access_server_connector_v2.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = access_server_connector_v2.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 Bearer authorization: Bearer Authorization
configuration = access_server_connector_v2.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Configure API key authorization: ServerName Authorization
configuration.api_key['ServerName Authorization'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ServerName Authorization'] = 'Bearer'


# Enter a context with an instance of the API client
async with access_server_connector_v2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = access_server_connector_v2.AccessApi(api_client)
    check_in = access_server_connector_v2.CheckIn() # CheckIn | 
    origin = 'origin_example' # str |  (optional)
    referer = 'referer_example' # str |  (optional)
    portal_id = 56 # int |  (optional)

    try:
        # Check a single resource
        api_response = await api_instance.check_v1_access_check_post(check_in, origin=origin, referer=referer, portal_id=portal_id)
        print("The response of AccessApi->check_v1_access_check_post:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AccessApi->check_v1_access_check_post: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccessApi* | [**check_v1_access_check_post**](docs/AccessApi.md#check_v1_access_check_post) | **POST** /v1/access/check | Check a single resource
*AccessApi* | [**courses_summary_v1_access_users_member_id_courses_get**](docs/AccessApi.md#courses_summary_v1_access_users_member_id_courses_get) | **GET** /v1/access/users/{member_id}/courses | List a member&#39;s course access summary
*AccessApi* | [**resolve_v1_access_resolve_post**](docs/AccessApi.md#resolve_v1_access_resolve_post) | **POST** /v1/access/resolve | Resolve a resource tree
*AccessApi* | [**tree_v1_access_users_member_id_courses_course_id_tree_post**](docs/AccessApi.md#tree_v1_access_users_member_id_courses_course_id_tree_post) | **POST** /v1/access/users/{member_id}/courses/{course_id}/tree | Resolve a course access tree
*AdminApi* | [**consume_v1_admin_consume_post**](docs/AdminApi.md#consume_v1_admin_consume_post) | **POST** /v1/admin/consume | Apply an access.order-events payload
*AdminApi* | [**health_health_get**](docs/AdminApi.md#health_health_get) | **GET** /health | Health check
*IndividualApi* | [**batch_overrides_v1_individual_overrides_batch_post**](docs/IndividualApi.md#batch_overrides_v1_individual_overrides_batch_post) | **POST** /v1/individual/overrides:batch | Batch-write per-member access overrides
*OwnershipApi* | [**deactivate_v1_ownership_reason_id_deactivate_post**](docs/OwnershipApi.md#deactivate_v1_ownership_reason_id_deactivate_post) | **POST** /v1/ownership/{reason_id}/deactivate | Deactivate (revoke) an ownership reason
*OwnershipApi* | [**grant_v1_ownership_grant_post**](docs/OwnershipApi.md#grant_v1_ownership_grant_post) | **POST** /v1/ownership/grant | Manually grant an access package
*OwnershipApi* | [**member_packages_v1_ownership_packages_post**](docs/OwnershipApi.md#member_packages_v1_ownership_packages_post) | **POST** /v1/ownership/packages | List the access packages a member owns (with count)
*OwnershipApi* | [**ownership_list_v1_ownership_list_post**](docs/OwnershipApi.md#ownership_list_v1_ownership_list_post) | **POST** /v1/ownership/list | List a member&#39;s ownership reasons
*PackagesApi* | [**count_packages_v1_packages_count_get**](docs/PackagesApi.md#count_packages_v1_packages_count_get) | **GET** /v1/packages/count | Count a portal&#39;s access packages
*PackagesApi* | [**create_package_v1_packages_post**](docs/PackagesApi.md#create_package_v1_packages_post) | **POST** /v1/packages | Create an access package
*PackagesApi* | [**get_package_v1_packages_access_package_id_get**](docs/PackagesApi.md#get_package_v1_packages_access_package_id_get) | **GET** /v1/packages/{access_package_id} | Get a single access package (with its rules)
*PackagesApi* | [**get_rules_v1_packages_access_package_id_rules_get**](docs/PackagesApi.md#get_rules_v1_packages_access_package_id_rules_get) | **GET** /v1/packages/{access_package_id}/rules | List a package&#39;s access rules
*PackagesApi* | [**link_product_v1_packages_access_package_id_products_put**](docs/PackagesApi.md#link_product_v1_packages_access_package_id_products_put) | **PUT** /v1/packages/{access_package_id}/products | Link a marketplace product to a package
*PackagesApi* | [**list_packages_v1_packages_get**](docs/PackagesApi.md#list_packages_v1_packages_get) | **GET** /v1/packages | List a portal&#39;s access packages (paginated)
*PackagesApi* | [**patch_package_v1_packages_access_package_id_patch**](docs/PackagesApi.md#patch_package_v1_packages_access_package_id_patch) | **PATCH** /v1/packages/{access_package_id} | Toggle is_active / is_locked
*PackagesApi* | [**set_rule_v1_packages_access_package_id_rules_put**](docs/PackagesApi.md#set_rule_v1_packages_access_package_id_rules_put) | **PUT** /v1/packages/{access_package_id}/rules | Set an access rule on a package


## Documentation For Models

 - [AccessMode](docs/AccessMode.md)
 - [AccessOrderEvent](docs/AccessOrderEvent.md)
 - [AccessResultOut](docs/AccessResultOut.md)
 - [Binding](docs/Binding.md)
 - [CheckIn](docs/CheckIn.md)
 - [ConsumeOut](docs/ConsumeOut.md)
 - [CourseStructure](docs/CourseStructure.md)
 - [CourseSummaryOut](docs/CourseSummaryOut.md)
 - [CourseTreeOut](docs/CourseTreeOut.md)
 - [DeactivateIn](docs/DeactivateIn.md)
 - [DeactivateOut](docs/DeactivateOut.md)
 - [EventOrder](docs/EventOrder.md)
 - [EventProduct](docs/EventProduct.md)
 - [EventSubscription](docs/EventSubscription.md)
 - [ExpiryType](docs/ExpiryType.md)
 - [GrantIn](docs/GrantIn.md)
 - [HTTPValidationError](docs/HTTPValidationError.md)
 - [HealthOut](docs/HealthOut.md)
 - [IdOut](docs/IdOut.md)
 - [LessonStructure](docs/LessonStructure.md)
 - [LocationInner](docs/LocationInner.md)
 - [LockReason](docs/LockReason.md)
 - [MemberPackagesIn](docs/MemberPackagesIn.md)
 - [MemberPackagesOut](docs/MemberPackagesOut.md)
 - [ModuleStructure](docs/ModuleStructure.md)
 - [ModuleTreeOut](docs/ModuleTreeOut.md)
 - [NodeAccessOut](docs/NodeAccessOut.md)
 - [OverrideBatchIn](docs/OverrideBatchIn.md)
 - [OverrideItem](docs/OverrideItem.md)
 - [OwnedPackageOut](docs/OwnedPackageOut.md)
 - [OwnershipListIn](docs/OwnershipListIn.md)
 - [OwnershipReasonOut](docs/OwnershipReasonOut.md)
 - [PackageDetailOut](docs/PackageDetailOut.md)
 - [PackageIn](docs/PackageIn.md)
 - [PackageOut](docs/PackageOut.md)
 - [PackagePatchIn](docs/PackagePatchIn.md)
 - [PackageRuleIn](docs/PackageRuleIn.md)
 - [ProductLinkIn](docs/ProductLinkIn.md)
 - [ReasonKind](docs/ReasonKind.md)
 - [ReasonStatus](docs/ReasonStatus.md)
 - [ResolveIn](docs/ResolveIn.md)
 - [ResolveOut](docs/ResolveOut.md)
 - [ResourceNodeIn](docs/ResourceNodeIn.md)
 - [ResourceType](docs/ResourceType.md)
 - [RuleBody](docs/RuleBody.md)
 - [RuleOut](docs/RuleOut.md)
 - [State](docs/State.md)
 - [TreeIn](docs/TreeIn.md)
 - [UnlockSpec](docs/UnlockSpec.md)
 - [UnlockType](docs/UnlockType.md)
 - [ValidationError](docs/ValidationError.md)
 - [WinningLayer](docs/WinningLayer.md)
 - [WrappedResponseAccessResultOut](docs/WrappedResponseAccessResultOut.md)
 - [WrappedResponseConsumeOut](docs/WrappedResponseConsumeOut.md)
 - [WrappedResponseCourseTreeOut](docs/WrappedResponseCourseTreeOut.md)
 - [WrappedResponseDeactivateOut](docs/WrappedResponseDeactivateOut.md)
 - [WrappedResponseHealthOut](docs/WrappedResponseHealthOut.md)
 - [WrappedResponseIdOut](docs/WrappedResponseIdOut.md)
 - [WrappedResponseInt](docs/WrappedResponseInt.md)
 - [WrappedResponseListCourseSummaryOut](docs/WrappedResponseListCourseSummaryOut.md)
 - [WrappedResponseListOwnershipReasonOut](docs/WrappedResponseListOwnershipReasonOut.md)
 - [WrappedResponseListPackageOut](docs/WrappedResponseListPackageOut.md)
 - [WrappedResponseListRuleOut](docs/WrappedResponseListRuleOut.md)
 - [WrappedResponseMemberPackagesOut](docs/WrappedResponseMemberPackagesOut.md)
 - [WrappedResponsePackageDetailOut](docs/WrappedResponsePackageDetailOut.md)
 - [WrappedResponseResolveOut](docs/WrappedResponseResolveOut.md)
 - [WrappedResponseWrittenOut](docs/WrappedResponseWrittenOut.md)
 - [WrittenOut](docs/WrittenOut.md)


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


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

- **Type**: API key
- **API key parameter name**: server_name
- **Location**: HTTP header

<a id="Bearer Authorization"></a>
### Bearer Authorization

- **Type**: Bearer authentication


## Author




