A small package that wraps a few of the SEMS Portal apis
Project description
SEMS Portal
Description
SEMS Portal is a simple wrapper designed to interact with various APIs exposed by a specific website. It simplifies the process of sending requests and handling responses, making it easier for developers to integrate and work with the available services.
Getting Started
Prerequisites
Before you begin, ensure you have met the following requirements:
- Python version >=3.5
Installation
To install SEMS Portal API, follow these steps:
-
Clone the repository:
git clone https://github.com/andrewgierens/sems_portal_api.git
-
Install the required packages:
pip install -r requirements.txt
Usage
To use SEMS Portal, you need to have Python and aiohttp
installed. Here’s a quick example to get you started:
import aiohttp
import asyncio
from sems_portal_api import login_to_sems, set_region
async def main():
set_region('eu')
async with aiohttp.ClientSession() as session:
account = "your_account"
password = "your_password"
data = await login_to_sems(session, account, password)
print(data)
if __name__ == "__main__":
asyncio.run(main())
In this example, we import the required modules and define an async
main function. Inside this function, we create an aiohttp.ClientSession
, which is used to send an HTTP request to the SEMS portal for logging in. Replace "your_account"
and "your_password"
with your actual login credentials.
The login_to_sems
function takes three parameters: the session, account, and password, and it returns the data received from the SEMS portal. The returned data is then printed to the console.
For testing the demo account credentials may be used:
account = "demo@goodwe.com"
password = "GoodweSems123!@#"
Contributing
Contributions to SEMS Portal are welcome and appreciated. If you have any suggestions or bug reports, please open an issue in the repository. creating a pull request.
License
This project is licensed under the GNU GPLv3 License - see the LICENSE.md file for details.
Contact
If you have any questions or want to reach out, you can contact me at apgierens@gmail.com
Contributors
Andrew Gierens |
Yannis Gerlach |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sems_portal_api-0.1.1.tar.gz
.
File metadata
- Download URL: sems_portal_api-0.1.1.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7a3ffe6d71a4872ef2857c7a93303f29a5e1e486961f7da5fa74a7d03533eca |
|
MD5 | e0b579d1c5c3f0f71b84b925b45165a8 |
|
BLAKE2b-256 | 1b22f7ea586f0109b83b443a7e2eaed3eaa09c84ef1c7174e7ab64856454d619 |
File details
Details for the file sems_portal_api-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: sems_portal_api-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9aeac11ca8d1c4a9ab235c4eb01bbaf8ebe4101186ce921184476e05ecc7bb8d |
|
MD5 | e20562b2862cf2474e63d255a23ff9f4 |
|
BLAKE2b-256 | 6b348df64248f4ee95daf2de22a83337dab11cd3146e5d9fef7ec3ae5eb6c488 |