The Qunicorn Core - Unification Middleware for a sovereign Quantum Cloud
This package uses Poetry (documentation).
VSCode
For vscode install the python extension and add the poetry venv path to the folders the python extension searches for venvs.
On linux:
{
"python.venvFolders": [
"~/.cache/pypoetry/virtualenvs"
]
}
Development
Run poetry install to install dependencies.
The flask dev server loads environment variables from .flaskenv and .env.
To override any variable create a .env file.
Environment variables in .env take precedence over .flaskenv.
See the content of the .flaskenv file for the default environment variables.
The currently available endpoints are:
POST /jobs/ (Create/Register and run new job)
Needs a valid token to connect to IBM
Runs asynchronously so the results are not shown in the api response
GET /jobs/{job_id}/ (Get details/results of a job)
Run the development server with
poetry run flask run
Start Docker, init the celery worker and then start it
poetry run invoke start-broker
poetry run invoke worker
Create the initial database
flask create-and-load-db
Check Linting Errors
poetry run invoke check-linting
Trying out the Template
For a list of all dependencies with their license open http://localhost:5005/licenses/. The Port for qunicorn_core is set to 5005 to not interfere with other flask default apps. Settings can be changed in the .flaskenv.
The API:
OpenAPI Documentation:
Configured in qunicorn_core/util/config/smorest_config.py.
Redoc (view only): http://localhost:5005/redoc
Rapidoc: http://localhost:5005/rapidoc
Swagger-UI: http://localhost:5005/swagger-ui
OpenAPI Spec (JSON): http://localhost:5005/api-spec.json
Debug pages:
Index: http://localhost:5005/debug/
Registered Routes: http://localhost:5005/debug/routes
Useful for looking up which endpoint is served under a route or what routes are available.
Remarks
For more detailed information about additional commands see the readme.md in docs.
Disclaimer of Warranty
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
Haftungsausschluss
Dies ist ein Forschungsprototyp. Die Haftung für entgangenen Gewinn, Produktionsausfall, Betriebsunterbrechung, entgangene Nutzungen, Verlust von Daten und Informationen, Finanzierungsaufwendungen sowie sonstige Vermögens- und Folgeschäden ist, außer in Fällen von grober Fahrlässigkeit, Vorsatz und Personenschäden, ausgeschlossen.
Acknowledgements
The initial code contribution has been supported by the project SeQuenC.