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

Uploaded Python 3

File details

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

File metadata

  • Download URL: planky-0.0.1.1.tar.gz
  • Upload date:
  • Size: 9.4 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.1.tar.gz
Algorithm Hash digest
SHA256 b064808631d5555b9e12531c14bb6f327994092d95e1f1d9673ba7b2bd246b17
MD5 60f36b0940ae6ae4fc2680ab3ed43382
BLAKE2b-256 64e45a507a921039ddd6571c46fe0ddbe2a904129de64f2e4b7733e99bbf2e22

See more details on using hashes here.

File details

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

File metadata

  • Download URL: planky-0.0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1695e24590fc37f431f95205a1eb31130ddba832b9246b3ebbb82360c2dfe1aa
MD5 02f0c4a11cfc7bef6f2e8845d761823f
BLAKE2b-256 391d4cd2400372d9f33daf47204981ef98456970079db16f7bcae3c9577c34cd

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