Skip to main content

No project description provided

Project description

Network Pypeline

PyPI version Python Documentation Status License

A powerful Python library for building efficient network communication pipelines, supporting both REST and WebSocket protocols with built-in rate limiting and time synchronization.

Features

  • 🔄 Dual Protocol Support: Seamlessly handle both REST and WebSocket communications
  • 🚦 Rate Limiting: Built-in throttling mechanism to respect API rate limits
  • Time Synchronization: Automatic time synchronization for accurate API interactions
  • 🏭 Factory Pattern: Easy-to-use factory for creating and managing connections
  • 🔌 Modular Design: Extensible processor architecture for custom request/response handling
  • 🛡️ Type Safety: Full type hinting support for better development experience

Installation

Install using pip:

pip install networkpype

Or with Poetry:

poetry add networkpype

Quick Start

REST Example

from networkpype.factory import ConnectionFactory
from networkpype.rest.method import Method

# Create a REST connection
factory = ConnectionFactory()
connection = factory.create_rest_connection(
    base_url="https://api.example.com",
    rate_limit=100  # requests per minute
)

# Make a request
response = connection.request(
    method=Method.GET,
    endpoint="/users",
    params={"page": 1}
)

WebSocket Example

from networkpype.factory import ConnectionFactory

# Create a WebSocket connection
factory = ConnectionFactory()
connection = factory.create_websocket_connection(
    url="wss://ws.example.com"
)

# Subscribe to updates
connection.subscribe(
    channel="market.btcusdt.trade",
    callback=lambda msg: print(f"Received: {msg}")
)

Documentation

For detailed documentation, please visit networkpype.readthedocs.io.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

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

Source Distribution

networkpype-0.1.0.tar.gz (27.9 kB view details)

Uploaded Source

Built Distribution

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

networkpype-0.1.0-py3-none-any.whl (38.2 kB view details)

Uploaded Python 3

File details

Details for the file networkpype-0.1.0.tar.gz.

File metadata

  • Download URL: networkpype-0.1.0.tar.gz
  • Upload date:
  • Size: 27.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Darwin/24.1.0

File hashes

Hashes for networkpype-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f8b985737e00d0d679ea195c7073ded5b7f9ea6c1d7d0ef3ab50c2a1735a6959
MD5 aeaa41b8850954e36b705519da6d5d7f
BLAKE2b-256 d8f18d9ee7f3d6bb406aa3cf5fe18fc7c19b56d4c02984c0bdd24d6440318bb7

See more details on using hashes here.

File details

Details for the file networkpype-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: networkpype-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.1 Darwin/24.1.0

File hashes

Hashes for networkpype-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aaedc392918130ce575618a96c9420e40bda6d6c46edca42a6773030867a1deb
MD5 94ec396dcae54d1056f55919ee1fdc3d
BLAKE2b-256 a80ce56143d0ab31e51b9dce26c5bd6eb0f830d2302f4af9b17b284296eec442

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