Skip to main content

A delightfully unhinged socket library with SSL support and caveman energy

Project description

update: 1.0.5

added requesttobyte

to install

pip install floofyredpanda

to use

from floofyredpanda import start_floofy_server

def handle(conn, addr):
    conn.send(b"bonk\n")
    conn.close()

start_floofy_server(9000, handle)

ssl

from floofyredpanda import ParanoidPanda

def handle_secure(conn, addr):
    conn.send(b"secure bonk\n")
    conn.close()

server = Paranoid_Panda(port=4443, handler=handle_secure, cert="cert.pem", key="key.pem")
server.start_paranoid_server()

client side

from floofyredpanda import tell_the_server

response = tell_the_server("localhost", 9000, "bonk")
print(response)

ssl

from floofyredpanda import secretly_tell_the_server

response = secretly_tell_the_server("localhost", 9000, "secret bonk") # ca is required to load selfsigned stuff response = secretly_tell_the_server("localhost", 9000, "secret bonk" ca = "the content of the ca.pem here")
print(response)

requesttobyte

from floofyredpanda import RedPandaClient, requesttobyte
castr = """the base64 of your ca pem here unfortunately it is
           required for https even if you dont need a ca since
           its a public site but its required to use ssl i will add just a tls = True or False in the future"""
s = RedPandaClient("www.example.com",443,ca = castr)
x = requesttobyte("/",host = "www.example.com",method = "get")
s.send(x.decode()) # you need to decode again because im stupid and encode everything that is in that queue
print(next(s.recv()))

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

floofyredpanda-1.0.5.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

floofyredpanda-1.0.5-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file floofyredpanda-1.0.5.tar.gz.

File metadata

  • Download URL: floofyredpanda-1.0.5.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for floofyredpanda-1.0.5.tar.gz
Algorithm Hash digest
SHA256 529cab7c82ac25679006aa1340c722f6ece2b10c8bd51e64faf42b8ac5d5a8b8
MD5 8310a041b5b05a81a9534b2dd17be473
BLAKE2b-256 fb6ba14c50c19df2fa151f3e4cf7ce8da72533afb0797f8568ee6ba099a2297b

See more details on using hashes here.

File details

Details for the file floofyredpanda-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: floofyredpanda-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for floofyredpanda-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e2a1bff61ffb8bc51b230fed66f788dca241e6c733c2f93c1c10fafbcdea03e1
MD5 40090b3803639eef391766cc4c472a64
BLAKE2b-256 9fd6afcd7f31e81aafcad96ccdd524ddf2d46bcd2f2ddb41dce070c51c0ddd05

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