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.1.tar.gz (10.7 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.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for planky-0.1.tar.gz
Algorithm Hash digest
SHA256 b50e4623b04513132ecec20727bca9ff40a61c72560cc34bffb6dabc736a3081
MD5 153e66a46e8f99ffdbdbb84daa38345e
BLAKE2b-256 cab5685fed13e8369a4a587d142488c9a873e521700e400dae2f011c8b1e9bba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: planky-0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b93a6ed5bc6c928c2a785feffcb096e8d7a8c5573df26658ba1a4eb16b04c9b
MD5 043e272d9920229fdad7ec7f99f35e01
BLAKE2b-256 2b1bf5f3001f433d0ef2c523e4a9df42e86debf53b6c5f76375872d6ef772401

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