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
]
Metadata
Release files for eclipse-pay 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eclipse-pay-1.0.2.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eclipse_pay-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.8 kB
Release files / eclipse-pay-1.0.2.tar.gz
| Download URL | eclipse-pay-1.0.2.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50c41dc364a43a9223147564bd6e7db8976269a02b263e47d8872356cd295d94
|
|
BLAKE2b-256 checksum How to use checksums |
d54e0e783fb5a0e76476c7101b2ae6ee17318da07861600463e78e8dea206085
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / eclipse_pay-1.0.2-py3-none-any.whl
| Download URL | eclipse_pay-1.0.2-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
996fd078ee551636d8fa6ea4005e7a5dcfb66311b6ad0164a65f98309d04d4e8
|
|
BLAKE2b-256 checksum How to use checksums |
b81209c8e5f07ee9fab65ebc5bb434e673eaa871425d464f34794379788d0ee9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|