Skip to main content

Software-as-a-Service (SaaS) Marketplace with cryptocurrency payments

Project description

service.markets

Software-as-a-Service (SaaS) Marketplace with cryptocurrency payments

Service.markets runs on FastAPI and uses Aleph.im for decentralized hosting.

Initial setup

Install the FastAPI library and Uvicorn:

poetry install

Activate the virtual environment, if not already done:

poetry shell

Run on local

Running the API

Uvicorn is used to run ASGI compatible web applications, such as the app web application from the example above. You need to specify it the name of the Python module to use and the name of the app:

python -m uvicorn src.service_markets.api.main:app --reload

Then open the app in a web browser on http://localhost:8000

Tip: With --reload, Uvicorn will automatically reload your code upon changes

Testing

To run the tests, you need to install the dev dependencies.

In order to avoid indexing all the messages and starting out with an empty database, you need to set the TEST_CHANNEL environment variable to true:

export TEST_CHANNEL=true

Then, you can run the API tests with:

poetry run pytest src/service_markets/api/test.py

Note: The tests run sequentially and if one fails, the following ones will also fail due to the event loop being closed.

Environment variables

Name Description Type Default
TEST_CACHE Whether to use the test cache bool true
TEST_CHANNEL Whether to use a fresh test channel bool false
ALEPH_CHANNEL The Aleph channel to use, is superseded by TEST_CHANNEL string None

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

service_markets-0.3.17.tar.gz (22.2 kB view hashes)

Uploaded Source

Built Distribution

service_markets-0.3.17-py3-none-any.whl (25.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page