Manage payments on scratch automatically.
Project description
eclipse-pay
Python library for interacting with scratch currencies.
Documentation
Running a server
Run a server with password on scratch
from eclipse_pay import Auth,Server
auth = Auth({
"type": "password",
"username": "LIZARD_OFFICIAL",
"password": "nuh uh"
})
server = Server(
auth=auth,
project_id="<project id>",
)
server.run()
Run a server with session id on scratch
from eclipse_pay import Auth,Server
auth = Auth({
"type": "sessionid",
"username": "LIZARD_OFFICIAL",
"sessionid": "nuh uh"
})
server = Server(
auth=auth,
project_id="<project id>",
)
server.run()
Run a server with username on turbowarp
from eclipse_pay import Auth,Server
auth = Auth({
"type": "tw",
"username": "LIZARD_OFFICIAL"
})
server = Server(
auth=auth,
project_id="<project id>",
on_turbowarp=True
)
server.run()
Adding new currencies
Create a new file in eclipse_pay/currencies (e.g. coolcoin.py):
from eclipse_pay import BaseCurrency
class CoolCoin(BaseCurrency):
@property
def name():
return "coolcoin" # in lowercase
def check_transaction(sender,recipient,amount):
"""Make this function check, if *sender* sent *recipient* *amount* CoolCoins. (Usually with an API.)"""
return True
And then, add your currency in eclipse_pay/__init__.py
from currencies.lrcoin import LRCOIN
from currencies.coolcoin import CoolCoin
_CURRENCY = [
LRCOIN,
CoolCoin
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eclipse-pay-1.0.2.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file eclipse-pay-1.0.2.tar.gz
.
File metadata
- Download URL: eclipse-pay-1.0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50c41dc364a43a9223147564bd6e7db8976269a02b263e47d8872356cd295d94 |
|
MD5 | 58e4e3deadae9b4c10127341b59bc422 |
|
BLAKE2b-256 | d54e0e783fb5a0e76476c7101b2ae6ee17318da07861600463e78e8dea206085 |
File details
Details for the file eclipse_pay-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: eclipse_pay-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 996fd078ee551636d8fa6ea4005e7a5dcfb66311b6ad0164a65f98309d04d4e8 |
|
MD5 | 8ae97fdecfdfa06aa47a943b8943f537 |
|
BLAKE2b-256 | b81209c8e5f07ee9fab65ebc5bb434e673eaa871425d464f34794379788d0ee9 |