Skip to main content

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

Project description

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
  • Поддержка проверки сертификата на сервере
  • Поддержка кастомных парсеров
  • Поддержка асинхронности

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

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

Пока нету

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

planky-0.0.1.2.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

planky-0.0.1.2-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file planky-0.0.1.2.tar.gz.

File metadata

  • Download URL: planky-0.0.1.2.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for planky-0.0.1.2.tar.gz
Algorithm Hash digest
SHA256 37332e3a0f02a79ed02b2d70a0280f6a063744851b7eb9f89ea31d322cd775b3
MD5 4f0d9b4783a687da74be141ecfb66cc6
BLAKE2b-256 86339a37d277c6ede8ef946487202abc99069ddd269c31b3ca7ec3d83b91ead3

See more details on using hashes here.

File details

Details for the file planky-0.0.1.2-py3-none-any.whl.

File metadata

  • Download URL: planky-0.0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for planky-0.0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 26f5ebc8bf5d0b72dba9636eb4bd485eb3791a88fdfef472c7045b198a81a868
MD5 0c458ecbd4a19b9b0df623f553d55688
BLAKE2b-256 d7587f375f042697f134089548ecefc425ac3a948fcff6c693409d6e60140a6c

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