452ef1cee38306303074f023d76df149b619fffd
Add POST /api/accounts endpoint that accepts email and password fields, validates email format using regex, hashes password with bcrypt, and stores the new account record in the database. Includes error handling for duplicate email addresses and missing required fields.
devRanta
devRanta is an async devrant client written in and for Python. Authentication is only needed for half of the functionality and thus username and password are optional parameters by constructing the main class of this package (Api).
You can find last packages in tar and wheel format here.
Running
make run
Testing
Tests are only made for methods not requireing authentication. I do not see value in mocking requests.
make test
How to use
Implementation:
from devranta.api import Api
api = Api(username="optional!", password="optional!")
async def list_rants():
async for rant in api.get_rants():
print(rant["user_username"], ":", rant["text"])
Languages
Python
98.1%
Makefile
1.9%