semvec/pypi-packages huggingface dataset:
mayfpayapi 1.5.2
MayfPayApi is a Python library for interacting with the MayfPay payment system API. It provides methods for retrieving kassa balances, creating and checking invoices.

# MayfPayApi BETA

## MayfPayApi is a Python library for interacting with the MayfPay payment system API. It provides methods for retrieving kassa balances, creating and checking invoices.

## Installation

You can install MayfPayApi using pip:

```python
pip install mayfpayapi
```


## Usage

# Creating an instance of the MayfPayApi class
```python
api = MayfPayApi(api_token="your_api_token", kassa_id=your_kassa_id, public_key="your_public_key", secret_key="your_secret_key")
```

# Calling the get_kassa_balance method
```python
kassa_balance = api.get_kassa_balance()
print(kassa_balance)
```

# Calling the create_invoice method
```python
amount = 100.0
order_id = "your_order_id"
expire_invoice = 3600
payment_method = "your_payment_method"
comment = "your_comment"
data = {"key": "value"}
invoice = api.create_invoice(amount, order_id, expire_invoice, payment_method, comment, data)
print(invoice)
```

# Calling the check_invoice method
```python
order_id = "your_order_id"
invoice_status = api.check_invoice(order_id)
print(invoice_status)
```


## Contributing

Contributions are welcome! Please feel free to submit a pull request.

## License
### MayfPayApi is released under the MIT License. See LICENSE for more information.
pyspectroworks 1.0.1
pySpectroWorks is a Python module for loading data from SpectroWorks™.
Requires Python: >=3.7

# pySpectroWorks

pySpectroWorks is a Python module for loading data from SpectroWorks™. This readme file provides a brief introduction to the module and how it can be used.

## Getting started

Installation:

```
pip install pyspectroworks
```

Import the module and establish a connection to SpectroWorks™ using your API key:
```
import pyspectroworks

api_key = "INSERT_API_KEY_HERE"
conn = pyspectroworks.connect(api_key)
```

## Usage

Once you have a connection instance you can extract all your projects as a list:
```
projects = conn.get_projects()
```

Each element in this list is a `Project` object. All data about a project is found in its `data` attribute, however, the most useful information has its own attributes:
```
project = projects[0]  # get first project
print("Project name:", project.project_name)
print("Number of items:", project.num_files)
print("Created:", project.created)  # unix timestamp of when this project was created
print("Last modified:", project.modified)  # unix timestamp of when this project was last modified
```
 
Each project can include several items. These are your experiments and can be extracted with the `get_items` method:
```
items = project.get_items() # get all items in project
```

Like projects, items include a multitude of different data which can be accessed by the item's `data` attribute. 
The box code and cuvette number can be found in the `box_code` and `cuvette_idx` attributes. 
Calculated results are available in the items `results` attribute.

 ```
item = items[0] # get first item
ri = item.results['refractive_index']['value'] # get the refractive index
# print cuvette and refractive index
print(f'Cuvette: {item.box_code: >6}{item.cuvette_idx:0>2}, Refractive Index: {ri: >8}')
```

To extract the spectral data use the `get_spectrum` method of the item.  
The available spectrum types are:
 - `reference_B` (B side reference spectrum)
 - `sample_A` (A side sample spectrum)
 - `sample_B` (B side sample spectrum)
 - `sample_D` (D side sample spectrum)
 
```
spectrum = item.get_spectrum('sample_B')
```

The spectrum is a list consisting of pairs of wavelengths and attenuance values. 

# Example script
An example script can be found in [api_test.py](api_test.py)

# Aplications
- **Analysis of water quality** - pySpectroWorks can be used to extract spectral data from water samples, which can be used to identify pollutants and contaminants.

- **Analysis of beverages** - pySpectroWorks can be used to analyze the spectral data of beverages such as wine, beer, and juice, which can provide information on their chemical composition and quality.

- **Analysis of oils and fats** - pySpectroWorks can be used to analyze the spectral data of liquid oils and fats, which can provide information on their composition and purity.

- **Analysis of biological fluids** - pySpectroWorks can be used to extract spectral data from biological fluids such as blood, urine, and saliva, which can provide information on disease diagnosis and treatment.