Skip to main content

Official Neuronum Library

Project description

Neuronum

Neuronum: An E2EE Data/Web Engine

Website Documentation PyPI Version
Python Version License


Getting Started into the Neuronum Network

In this brief getting started guide, you will:


About Neuronum

Neuronum is a real-time, end-to-end encrypted data/web engine built in Python. It enables secure communication between devices and services by encrypting data client-side using the recipient's public key. Encrypted messages are transmitted through a passive relay server and decrypted on the recipient’s device using its private key. The relay server facilitates connectivity but cannot access or alter the content of messages.

Requirements

  • Python >= 3.8

Connect To Neuronum

Installation (optional but recommended: create a virtual environment)

pip install neuronum

Create your Cell (your secure identity):

neuronum create-cell

or

Connect an existing Cell (your secure identity):

neuronum connect-cell

Transmit Data Securely

import asyncio
from neuronum import Cell

async def main():
    
    async with Cell() as cell: 

        data = {
            "some": "data"  # Replace with your actual payload
        }

        # Use activate_tx() if you expect a response from the other cell
        # Replace id with the actual Cell ID
        tx_response = await cell.activate_tx("id::cell", data)
        print(f"Json Response: {tx_response['json']}")
        print(f"HTML Response: {tx_response['html']}")

        # Stream data to another cell (no response expected)
        # Replace id with the actual Cell ID
        await cell.stream("id::cell", data)

if __name__ == '__main__':
    asyncio.run(main())

Receive Data Securely

import asyncio
from neuronum import Cell

async def main():
    async with Cell() as cell: 
        
        async for transmitter in cell.sync():
            ts_str = transmitter.get("time")
            data = transmitter.get("data")
            transmitter_id = transmitter.get("transmitter_id")   
            client_public_key = data.get("public_key", {})  

            response_data = {
                "json": {
                    "status": "success",
                    "message": "Data Received Securely - Your request was processed successfully"
                },
                "html": """
                    <!DOCTYPE html>
                    <html lang="en">
                    <head>
                        <meta charset="UTF-8">
                        <title>Secure Data Response</title>
                    </head>
                    <body>
                        <h3>Data Received Securely</h3>
                        <p>Your request was processed successfully.</p>
                    </body>
                    </html>
                """
            }
            await cell.tx_response(transmitter_id, response_data, client_public_key)

if __name__ == '__main__':
    asyncio.run(main())

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuronum-11.0.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuronum-11.0.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file neuronum-11.0.0.tar.gz.

File metadata

  • Download URL: neuronum-11.0.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for neuronum-11.0.0.tar.gz
Algorithm Hash digest
SHA256 31f71e0b783a56cd3f661d2c2a17a2bda3855c8410ca4438ff525cc96c8fced0
MD5 dbedbf69cf0c5437928a377875cc3b96
BLAKE2b-256 ecb1500e894142598dc8d2d54a08bd522f1d514817d648427d6ec4fc9d164792

See more details on using hashes here.

File details

Details for the file neuronum-11.0.0-py3-none-any.whl.

File metadata

  • Download URL: neuronum-11.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for neuronum-11.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f93badbb29863114122a3f584b73f64e76fdce846c378212c78068016025745
MD5 444ec59a0239add3c97dcb060e97f3d4
BLAKE2b-256 581ec7ff5adf5c05c28659a7797683aa13e5e38c3e61cc5396a5f5158b7f2475

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page