Skip to main content

Planky

icon.png

🇬🇧 English

Description

Planky is an easy-to-use and highly customizable tool for building your own tcp/tls server.

Installation

pip install Planky

Usage

from Planky.events.messageEvent import MessageEvent
from Planky.messages.parsedMessage import ParsedMessage
from Planky.plankyData import PlankyData
from Planky.plankyServer import PlankyServer

server = PlankyServer("127.0.0.1", port=1111)

@server.on_message(ParsedMessage)
async def parsed_message(handler, event: MessageEvent):
    if event.message.content == b"hello": 
        await handler.send_data(PlankyData(payload=b"world"))
    else:
        await handler.send_data(PlankyData(payload=event.message.content))

if __name__ == "__main__":
    server.mainloop()

Main features

  • Simple usage
  • TLS support
  • Server side certificate validation support
  • Custom parsers support
  • Async support

Documentation

Thanks

Nobody...

🇷🇺 Русский

Описание

Planky — это простой и гибкий инструмент для создания собственного асинхронного tcp/tls сервера.

Установка

pip install Planky

Использование

from Planky.events.messageEvent import MessageEvent
from Planky.messages.parsedMessage import ParsedMessage
from Planky.plankyData import PlankyData
from Planky.plankyServer import PlankyServer

server = PlankyServer("127.0.0.1", port=1111)

@server.on_message(ParsedMessage)
async def parsed_message(handler, event: MessageEvent):
    if event.message.content == b"hello": 
        await handler.send_data(PlankyData(payload=b"world"))
    else:
        await handler.send_data(PlankyData(payload=event.message.content))

if __name__ == "__main__":
    server.mainloop()

Основные возможности

  • Простое использование
  • Поддержка tls
  • Поддержка проверки сертификата на сервере
  • Поддержка кастомных парсеров
  • Поддержка асинхронности

Документация

Благодарности

Пока нету

Metadata

Release files for planky 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for planky 0.1
File Size Uploaded
planky-0.1.tar.gz 10.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for planky 0.1
File Interpreter ABI Platform
planky-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.8 kB

Release files / planky-0.1.tar.gz

Download URL planky-0.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b50e4623b04513132ecec20727bca9ff40a61c72560cc34bffb6dabc736a3081
BLAKE2b-256 checksum
How to use checksums
cab5685fed13e8369a4a587d142488c9a873e521700e400dae2f011c8b1e9bba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release files / planky-0.1-py3-none-any.whl

Download URL planky-0.1-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b93a6ed5bc6c928c2a785feffcb096e8d7a8c5573df26658ba1a4eb16b04c9b
BLAKE2b-256 checksum
How to use checksums
2b1bf5f3001f433d0ef2c523e4a9df42e86debf53b6c5f76375872d6ef772401
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page