semvec/pypi-packages huggingface dataset:
AIOrqlite 0.2.3
Ayncio-based Python client for rqlite.

=========
aiorqlite
=========
This package contains an asynchronous, pure-Python rqlite client library. (based on the official pyrqlite library)

.. contents::

Requirements
-------------

* Python -- one of the following:

  - CPython >= 3.6 recommended (>= 3.4 will work, probably)

* rqlite Server


Example
-------

The following code creates a connection and executes some statements:

.. code:: python

	import aiorqlite

	@aiorqlite.arun
	async def main():
		# Connect to the database
		async with aiorqlite.connect(':memory:') as db:
			async with db.cursor() as cursor:
				await cursor.execute('CREATE TABLE foo (id integer not null primary key, name text)')
				await cursor.executemany('INSERT INTO foo(name) VALUES(?)', seq_of_parameters=(('a',), ('b',)))

			async with db.cursor() as cursor:
				# Read a single record with qmark parameter style
				sql = "SELECT `id`, `name` FROM `foo` WHERE `name`=?"
				await cursor.execute(sql, ('a',))
				result = await cursor.fetchone()
				print(result)
				# Read a single record with named parameter style
				sql = "SELECT `id`, `name` FROM `foo` WHERE `name`=:name"
				await cursor.execute(sql, {'name': 'b'})
				result = await cursor.fetchone()
				print(result)

	main()



This example will print:

.. code:: python

	{'id': 1, 'name': 'a'}
	{'id': 2, 'name': 'b'}



Paramstyle
----------

Only qmark and named paramstyles (as defined in PEP 249) are supported. 

Limitations
-----------
Transactions are not supported.

License
-------
pyrqlite (and subsequently aiorqlite) is released under the MIT License. See LICENSE for more information.
CppPythonSocket 0.2.2
Simple TCP/IP socket comunication wrapper between c++ and Python for IPC.

**IMPORTANT NOTE**: This is more an exercice for me to learn how to make installable packages than an actual useful package. It is not finished, so expect errors and a lot of missing stuff.

# cpp_python_socket
Simple TCP/IP socket comunication wrapper between c++ and Python for IPC.

## General Information
To install c++ package, read/edit source code and more info check out the repo:
https://github.com/OleguerCanal/cpp_python_socket.git

## Usage examples
Python Server:
```Python
from CppPythonSocket import Server
import cv2

if __name__ == "__main__":
  server = Server("127.0.0.1", 5002)

  # Check that connection works
  message = server.receive()
  print("[CLIENT]:" + message)
  server.send("Shut up and send an image")

  # Receive and show image
  image = server.receive_image()
  cv2.imshow('SERVER', image)
  cv2.waitKey(1000)
  server.send("Thanks!")
```

C++ client:
```cpp
#include <iostream>
#include "client.hpp"

int main() {
    socket_communication::Client client("127.0.0.1", 5002);

    // Check that connection works
    client.Send("Hello hello!");
    std::string answer = client.Receive();
    std::cout << "Server: " << answer << std::endl;

    // Load image and send image
    cv::Mat img = cv::imread("cpp/lena.png");
    client.SendImage(img);
    std::string answer2 = client.Receive();
    std::cout << "Server: " << answer2 << std::endl;
}
```