semvec/pypi-packages huggingface dataset:
flowgo 1.1
This module for creating and working with individual threads in the local memory of each.
Keywords: stack, local, threaded

# Introduction

`flowgo`  is a module for creating and working with individual threads in the local memory of each.
When threads are created, the system allocates an array of dtype values for thread local storage (TLS), which are initialized to NULL values. 
Before an index can be used, one of the threads must be assigned. Each thread stores its index data in an array of TLS slots. 
If the data associated with the index matches a value of type dtype , you can store the data directly in the TLS slot.

![alt text](https://github.com/YesthisI/flow/blob/main/images/Process.jpg)

# Installation
```
pip install flowgo
```
# Import
```python
from flowgo import new
```

#User Example
```python
>>>from flowgo import new
>>> d = new(float,10)
>>> d.index
[[0.0], [0.0], [0.0], [0.0], [0.0], [0.0], [0.0], [0.0], [0.0], [0.0]]
>>>import random
>>>class neuron:
	def key(self):
		self.f = random.random()
		return self.f
>>> g = neuron()
>>> g
<__main__.neuron object at 0x000001E4183EE3D0>
>>>for y in range(0,10,1):
	d.index[y] = neuron()
	print(d.index[y])


<__main__.neuron object at 0x000001E4183C4D90>
<__main__.neuron object at 0x000001E4183C4DF0>
<__main__.neuron object at 0x000001E4183C4FA0>
<__main__.neuron object at 0x000001E4183C4D60>
<__main__.neuron object at 0x000001E4183C4E50>
<__main__.neuron object at 0x000001E4183C4F10>
<__main__.neuron object at 0x000001E4183C4FD0>
<__main__.neuron object at 0x000001E4183EE100>
<__main__.neuron object at 0x000001E4183EE160>
<__main__.neuron object at 0x000001E4183EE1C0>

>>> for y in range(0,10,1):
	d.index[y] = g.key()
	print(d.index[y])


0.44911829971109984
0.799771054321658
0.9866593046500528
0.5261054909048434
0.584669797754662
0.45202100815352386
0.9676910835103338
0.8198882778445146
0.7652557520179178
0.043740125797619434

>>> d.index
[0.44911829971109984, 0.799771054321658, 0.9866593046500528, 0.5261054909048434, 
0.584669797754662, 0.11103911368026942, 0.9732179960637262, 0.45910841138678904, 
0.4323464306091388, 0.017103767583308005]
>>> for y in range(3,10,1):
	d.index[y] = neuron().key()
	print(d.index[y])

0.736735454198254
0.5561266578913844
0.14408739831419615
0.6957408632107883
0.04113475552348311
0.1883360140198398
0.3012576585293536
>>> d.index.insert(5,neuron())
>>> d.index
[[0.0], [0.0], [0.0], 0.736735454198254, 0.5561266578913844, <__main__.neuron object at 0x000001E411A9E8E0>, 
0.14408739831419615, 0.6957408632107883, 0.04113475552348311, 0.1883360140198398, 0.3012576585293536]
```
pythonipc 1.4.2
Inter-process communication library for Python3 to interact with JS renderer
Requires Python: >=3.6

# PYTHONIPC

This project is solely used because I hate using js for IPC controls

Essentially this is a python port of electron IPC module

Instead of the renderer interacting with the main process, a socketio client is used to communicate with a python3 socketio server

A package for javascript client is available under the following git:

[JsIPC](https://github.com/its-mr-monday/jsipc)

## Installation

Simply install using pip or your favourite package manager

```console
    pip install pythonipc
```

# PYTHONIPC ocumentation

## Import

```python
from pythonipc import PyIPC
```

## Class: PyIPC

### Constructor

```python
PyIPC(port: int = 5000, debug = False)
```

Creates a new PyIPC instance.

- `port`: The port number to run the server on (default is 5000)

### Methods

#### start()

Starts the PyIPC server in a separate thread.

```python
ipc = PyIPC()
ipc.start()
```

#### on(event: str)

Decorator to register a handler for a specific event.

```python
@ipc.on('greet')
def greet_handler(data):
    return f"Hello, {data['name']}!"
```

#### off(event: str)

Removes a handler for a specific event.

```python
ipc.off('greet')
```

#### invoke(event: str, data: Any = None, timeout: float = 5.0) -> Any

Invokes a remote procedure and waits for its response.

```python
result = ipc.invoke('greet', {'name': 'Alice'})
print(result)  # Outputs: Hello, Alice!
```

#### get_connections() -> int

Get the number of connected clients.

```python
connections = ipc.get_connections()
print(f"There are {connections} clients connected")
```

### has_connection() -> bool

Check if there are any connected clients.

```python
if ipc.has_connection():
    print("We have a connection!")
```

#### kill()

Stops the PyIPC server and cleans up resources.

```python
ipc.kill()
```

## Full Example

```python
from pythonipc import PyIPC

ipc = PyIPC(port=5000)

@ipc.on('greet')
def greet_handler(data):
    return f"Hello, {data['name']}!"

def main():
    ipc.start()
    
    try:
        result = ipc.invoke('greet', {'name': 'Alice'})
        print(result)  # Outputs: Hello, Alice!
    finally:
        ipc.kill()

main()
```

This example sets up a PyIPC server, registers a 'greet' handler, invokes it, and then shuts down the server.