semvec/pypi-packages huggingface dataset:
necmec-api 0.1.3
Python client for interacting with the necmec API
License: MIT
Requires Python: >=3.6

# NECMEC API python wrapper Client

A Python client for interacting with the **NECMEC API python wrapper**. This API allows users to submit reports, upload files, and perform other operations necessary to complete the submission process. Base API docs https://exttest.cybertip.org/ispws/documentation/index.html#overview

## Features

- **Verify Connection**: Check if the client can connect to the server and authenticate.
- **Download XSD Schema**: Retrieve the latest XML Schema Definition (XSD) for report submission.
- **Report Submission**: Open and submit a report in the system.
- **File Upload**: Upload files to a report.
- **File Details**: Provide additional details for uploaded files.
- **Finish Submission**: Finish the report submission process.
- **Retract Submission**: Cancel an open report submission.

## Installation

To install the package, you can use `pip`:

```bash
pip install necmec-api
```

### help
```
python3 -m necmec_api.cli --help
```

### status
```
python3 -m necmec_api.cli --config config.json --username your_username --password your_password --environment test status
```

### submit a report 
```
python3 -m necmec_api.cli --config config.json --username your_username --password your_password --environment test  submit "<xml_data>"

```

### Cancel the Report
```
python3 -m necmec_api.cli --config config.json --username your_username --password your_password --environment test  retract <report_id>
```

### Refer demo.py
```
python3 -m venv env
source env/bin/activate
pip install necmec-api
cat <<EOF > config.json
{
    "production": {
      "base_url": "https://report.cybertip.org/ispws",
      "status_url": "/status",
      "xsd_url": "/xsd",
      "submit_url": "/submit",
      "upload_url": "/upload",
      "fileinfo_url": "/fileinfo",
      "finish_url": "/finish",
      "retract_url": "/retract"
    },
    "test": {
      "base_url": "https://exttest.cybertip.org/ispws",
      "status_url": "/status",
      "xsd_url": "/xsd",
      "submit_url": "/submit",
      "upload_url": "/upload",
      "fileinfo_url": "/fileinfo",
      "finish_url": "/finish",
      "retract_url": "/retract"
    }
  }
EOF
python3 demo.py
```
beam-mysql-connector2 1.9.0
Apache Beam I/O connector designed for accessing MySQL databases.
License: MIT
Requires Python: >=3.12
Keywords: Updated apache beam mysql connector based on beam-mysql-connector

# Beam - MySQL Connector
[![PyPI version](https://badge.fury.io/py/beam-mysql-connector2.svg)](https://badge.fury.io/py/beam-mysql-connector2)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/beam-mysql-connector2)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Beam - MySQL Connector is an io connector of [Apache Beam](https://beam.apache.org/) to access MySQL databases.

## Installation
```bash
pip install beam-mysql-connector2
```

## Getting Started
- Read From MySQL
```Python
from beam_mysql.connector import splitters
from beam_mysql.connector.io import ReadFromMySQL


read_from_mysql = ReadFromMySQL(
        query="SELECT * FROM test_db.tests;",
        host="localhost",
        database="test_db",
        user="test",
        password="test",
        port=3306,
        splitter=splitters.NoSplitter()  # you can select how to split query for performance
)
```

- Write To MySQL
```Python
from beam_mysql.connector.io import WriteToMySQL


write_to_mysql = WriteToMySQL(
        host="localhost",
        database="test_db",
        table="tests",
        user="test",
        password="test",
        port=3306,
        batch_size=1000,
)
```

## License
MIT License. Please refer to the [LICENSE.txt](https://github.com/esaki01/beam-mysql-connector2/blob/master/LICENSE.txt), for further details.