Metadata-Version: 2.4
Name: snowland-authsdk
Version: 0.1
Summary: snowland-authsdk, oauth 2.0 framework for Snowland.ltd
Home-page: https://gitee.com/snowlandltd/snowland-auth-sdk-python
Author: A.Star
Author-email: astar@snowland.ltd
Maintainer: A.Star
Maintainer-email: astar@snowland.ltd
License: Apache v2.0
Platform: all
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: Implementation
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: pyjwt
Requires-Dist: snowland-smx>=1.0.0
Requires-Dist: astartool>=0.2
Requires-Dist: easydict
Requires-Dist: decorator
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: platform
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# snowland-auth-sdk-python
[![Version](https://img.shields.io/badge/Python-3.8|3.9|3.10|3.11|3.12-yellowgreen.svg)]()
[![License](http://img.shields.io/:License-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
[![PyPI Version](https://img.shields.io/pypi/v/snowland-authsdk)](https://gitee.com/snowlandltd/snowland-auth-sdk-python)


The SDK that works alongside snowland-auth-python.

## Usage
1. First, register an account on the snowland-auth website.
2. Create an application on the snowland-auth website to obtain the application's `access_key` and `access_secret`.
3. As shown in the demo:
- Create an OAuth object

```python
from snowland_authsdk.login import OAuth
access_key = 'tuxf517fqdserop68z1m3zmf6bs6tkrf'
access_secret = '2446ea7d1722da461052d547268480b5aca159a781ccba27908a3acde887889c'
app = OAuth(access_key, access_secret)
```

- Redirect the URL so that the user can send a request to the third-party server
```python
res = app.oauth_authorize(**param, **user)
```
- Obtain the user's `code`, and use it to apply for a token from the third-party server
```python
res = app.oauth_access_token(**{"code": code, "method":'post'})
```
- Use the token to request data from the third-party server
```python
res = app.oauth_access_token(**{"code": code, "method": 'get'})
```

## Adoption Registry
More companies adopting this project are welcome to register at the registration address. Registration is only for product promotion.

The following companies or organizations have directly or indirectly used this project:

- A.Star Algorithm Group
- Hebei Snowland Network Technology Co., Ltd.

...


## Copyright and License
This product is open source and free, and will continue to provide technical support. Individual or enterprise users are free to access and use.

Licensed under the Apache v2.0 License (Apache 2.0).
Copyright (c) 2019-present, Snowland Co,.Ltd

The product is open source and free of charge, and we will continue to provide technical support. Individuals and enterprises may freely integrate and use it.

## Donate
No matter how much the amount is, it is enough to express your thought. Thank you very much ：） To donate

No matter how much the amount is, it is enough to express your appreciation. Thank you very much ：）
