https://github.com/tankerhq/identity-python
Identity generation in Python for the Tanker SDK
https://github.com/tankerhq/identity-python
Last synced: 2 months ago
JSON representation
Identity generation in Python for the Tanker SDK
- Host: GitHub
- URL: https://github.com/tankerhq/identity-python
- Owner: TankerHQ
- License: other
- Created: 2018-03-26T08:54:07.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-12T09:48:55.000Z (4 months ago)
- Last Synced: 2025-03-25T17:28:30.829Z (3 months ago)
- Language: Python
- Homepage:
- Size: 419 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/TankerHQ/identity-python/actions)
[](https://pypi.org/project/tankersdk-identity)
[](https://codecov.io/gh/TankerHQ/identity-python)
[](https://github.com/TankerHQ/identity-python/actions/workflows/safety.yml)# Identity SDK
Tanker identity generation in Python for the [Tanker SDK](https://docs.tanker.io/latest/).
## Installation
With `pip`:
```sh
$ pip install tankersdk-identity
```## API
```python
tankersdk_identity.create_identity(app_id, app_secret, user_id)
```Create a new Tanker identity. This identity is secret and must only be given to a user who has been authenticated by your application. This identity is used by the Tanker client SDK to open a Tanker session
**app_id**
The app ID, must match the one used in the constructor of the Core SDK.**app_secret**
The app secret, secret that you have saved right after the creation of your app.**user_id**
The ID of a user in your application.```python
tankersdk_identity.create_provisional_identity(app_id, "email", email)
```Create a Tanker provisional identity. It allows you to share a resource with a user who does not have an account in your application yet.
**app_id**
The app ID, must match the one used in the constructor of the Core SDK.**email**
The email of the potential recipient of the resource.```python
tankersdk_identity.get_public_identity(identity)
```Return the public identity from an identity. This public identity can be used by the Tanker client SDK to share encrypted resource.
**identity**
A secret identity.## Going further
Read more about identities in the [Tanker guide](https://docs.tanker.io/latest/guides/identity-management/).
Check the [examples](https://github.com/TankerHQ/identity-python/tree/master/examples) folder for usage examples.