semvec/pypi-packages huggingface dataset:
sems-portal-api 0.1.1
A small package that wraps a few of the SEMS Portal apis
Requires Python: >=3.5

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

1. Clone the repository:
   ```bash
   git clone https://github.com/andrewgierens/sems_portal_api.git
   ```

2. Install the required packages:
   ```bash
   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:

```python
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:
```python
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](https://help.github.com/articles/creating-a-pull-request/).

## License
This project is licensed under the GNU GPLv3 License - see the [LICENSE.md](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
<!-- readme: contributors -start -->
<table>
<tr>
    <td align="center">
        <a href="https://github.com/andrewgierens">
            <img src="https://avatars.githubusercontent.com/u/4150500?v=4" width="100;" alt="andrewgierens"/>
            <br />
            <sub><b>Andrew Gierens</b></sub>
        </a>
    </td>
    <td align="center">
        <a href="https://github.com/ygerlach">
            <img src="https://avatars.githubusercontent.com/u/100762533?v=4" width="100;" alt="ygerlach"/>
            <br />
            <sub><b>Yannis Gerlach</b></sub>
        </a>
    </td></tr>
</table>
<!-- readme: contributors -end -->
Flask-CSV 1.2.1
Easily render CSVs within any flask application

#########
Flask-CSV
#########

Easily render CSVs within any flask application

Install
#######

Flask-CSV is packaged and you can use pip to install it::

    pip install flask_csv


How to use ?
############

Flask-CSV has a simple hepler method named `send_csv` which allows you to send
csv files in flask endpoints. It takes an iterable of `dict`, a filename and a
list of fields. The keys of all `dict` in the iterable must correspond to
given fields.

It will return a `Response` object with filename set and body containing the
CSV data.

You will better understand with a short example.

.. code-block:: python

    @app.route("/")
    def index():
        return send_csv([{"id": 42, "foo": "bar"}, {"id": 91, "foo": "baz"}],
                        "test.csv", ["id", "foo"])

Hitting this endpoint will return::

    id,foo
    42,bar
    91,baz


Passing additionnal parameters
##############################

The remaining arguments of `send_csv` will be passed to `send_file`. For
example, to disable caching, do the following:

.. code-block:: python

    send_csv([{"id": 42, "foo": "bar"}, {"id": 91, "foo": "baz"}],
             "test.csv", ["id", "foo"], cache_timeout=0)

You can also pass additionnal parameters to the CSV writer like this:

.. code-block:: python

    send_csv([{"foo": 42}, {"bar": "baz"}], "test.csv", ["foo"],
             writer_kwargs={"extrasaction": "ignore"})

In this example, the "bar" key will not raise a `ValueError` since the writer
will be given the parameter `extrasaction` with the value "ignore".


Change delimiter
################

You can also change the delimiter with the `delimiter` option.

.. code-block:: python

    send_csv([{"id": 42, "foo": "bar"}, {"id": 91, "foo": "baz"}],
             "test.csv", ["id", "foo"], delimiter=';')

Will result in::

    id;foo
    42;bar
    91;baz

Specifying file encoding
########################

You can also specify the encoding used to send the file, with the `encoding` option (`utf-8` by default).

.. code-block:: python

    send_csv([{"id": 42, "foo": "bar"}, {"id": 91, "foo": "baz"}],
             "test.csv", ["id", "foo"], encoding='iso-8859-1')

Use Marshmallow Schemas
#######################

You can use `Schema` from marshmallow by passing it as `schema` to `send_csv`.
If you want to keep only ids and ensure they are integers, you could do:

.. code-block:: python

    class IdSchema(Schema):
        id = fields.Integer()

    send_csv([{"id": 42, "foo": "bar"}, {"id": 91, "foo": "baz"}],
             "test.csv", ["id", "foo"], schema=IdSchema())

And that would result in this::

    id
    42
    91

SystemError returned a result with an error set
###############################################

When using uwsgi for your flask app, it might raise this kind of error on the send_file method.
If that were the case, adding the following option to your uwsgi conf should solve it :

`wsgi-disable-file-wrapper = true`
csvalidate 1.1.2
CSV reader and writer with validation

##########
csvalidate
##########

csvalidate is a minimal library for reading from and writing to csv with an
added layer of validation

Status
######

Even though csvalidate doesn't get much work, it is maintained. Don't hesitate
to open issues or pull requests.

Get Started
###########

Installation
============

As any python package, you can install it via pip::

    $ pip install csvalidate

How ot use it ?
===============

The gist of it is to subclass one of `ValidatedReader` or `ValidatedWriter` and
add a `schema` class attribute that defines validation.

Examples can be found in the `examples` directory.
rivector 2023.1.17.1
Fast CPython library for Vectors
Requires Python: >=3.11

# rivector - risknu vectors
This Python library introduces a set of fast vector classes, designed for convenient and rapid vector operations, similar to those in Unity. It is well-suited for game development using Pygame and also useful for general mathematical applications. The library is open source and available on GitHub.

> [!NOTE]
> It's worth noting that while you can add your own methods to the module, the library may not be as stable as other vector libraries. Please exercise caution and consider testing thoroughly, especially when compared to more established alternatives.

## How it Works and Why It's Fast
The core mathematical logic and vector class are entirely written in C++. They are then utilized through CPython in Python, transforming it into a wrapper class that can be fully utilized in Python. Speaking of its power, here are some speed-related details, including a comparison with the popular numpy library in mathematics:

![figure 1](./docs/figure_docs.png)

```diff
+ Vector2Wrapper 0.8779744120547548
- NumPy 1.6510654900339432
```

## Installation and Examples
To install this library on Python, you need Python version 3.12 or higher. Here are installation examples for different operating systems:

*Windows*
```bash
$ pip install rivector
```
*Linux/MacOS*
```bash
$ pip3 install rivector
```

*Usage Examples and Creating a Simple Vector:*
```python
from rivector import Vector2

vector = Vector2(10, 10)

print(vector.magnitude)  # Magnitude of the vector
print(vector + 10)  # Vector(20, 20)
print(vector + vector)  # Vector(20, 20)
# Other operations...
```

> [!NOTE]
> The library allows you to create and manipulate 2D vectors easily. You can find more details and methods in the [wiki](https://github.com/risknu/rivector/wiki) or in [official website](https://risknu.github.io/rivector). 

Feel free to contribute and enhance the functionality of the library as needed.

## License
This library is distributed under the Apache License 2.0.