Skip to main content
SINDIT Logo

Run backend using Docker Compose

To start the backend run (add the --build flag to build images before starting containers (build from scratch)):

docker-compose up
docker-compose up --build

This will build the GraphDB docker image and the FastAPI docker image.

The GraphDB instance will be available at: localhost:7200

The FastAPI documentation will be exposed at: http://0.0.0.0:9017

Run backend locally

Desription of how to start the backend locally outside docker. The backend consists of a GraphDB database and a FastAPI server.

GraphDB

To start GraphDB, run these scripts from the GraphDB folder:

bash graphdb_install.sh
bash graphdb_preload.sh
bash graphdb_start.sh

To test your graphbd connection run from your base folder (/sindit):

python run_test.py

Go to localhost:7200 to configure graphdb

API uvicorn server

First, ensure dependencies are installed:

uv pip install -e .

To start the FastAPI server, run:

python run_sindit.py

Run using vscode launcher

{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "Python Debugger: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "cwd": "${workspaceFolder}/src/sindit",
            "env": {
                "PYTHONPATH": "${workspaceFolder}/src"
            },
            "justMyCode": false
        }
    ]
}

Using the API

Authentication

The API requires a valid authentication token for most endpoints. Follow these steps to authenticate and use the API:

  1. Generate a Token:

    • Use the /token endpoint to generate an access token.
    • Example curl command:
      curl -X POST "http://127.0.0.1:9017/token" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "username=new_user&password=new_password"
      
    • Replace new_user and new_password with the credentials provided below.
  2. Use the Token:

    • Include the token in the Authorization header for all subsequent API calls:
      curl -X GET "http://127.0.0.1:9017/endpoint" \
      -H "Authorization: Bearer your_generated_token_here"
      
  3. Access API Documentation:

    • The FastAPI documentation is available at: http://127.0.0.1:9017/docs

Generate New Username and Password

To add a new user, update the fake_users_db in authentication_endpoints.py with the following credentials:

fake_users_db = {
    "new_user": {
        "username": "new_user",
        "full_name": "New User",
        "email": "new_user@example.com",
        "hashed_password": "$2b$12$eW5j9GdY3.EciS3oKQxJjOyIpoUNiFZxrON4SXt3wVrgSbE1gDMba",  # Password: new_password
        "disabled": False,
    }
}

To generate a new hashed password, use the Python snippet in password_hash.py. Replace "new_password" with your desired password.


Metadata

Release files for sindit 2.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sindit 2.0.17
File Size Uploaded Provenance Actions
sindit-2.0.17.tar.gz 2.2 MB Without provenance Details for sindit-2.0.17.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sindit 2.0.17
File Interpreter ABI Platform Actions
sindit-2.0.17-py3-none-any.whl Python 3 none any Details for sindit-2.0.17-py3-none-any.whl

Total release size: 4.4 MB

Release files / sindit-2.0.17.tar.gz

Download URL sindit-2.0.17.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
6a5f9805c52de1e0f4ecd7cc0862a5c6c2f43bbb6e1671b9bab6ab2ba0a27a5b
BLAKE2b-256 checksum
How to use checksums
a3fb539f5351802727d7858ec0da4351ed860b94de6c6012e338acdfb5b42fd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.7

Release files / sindit-2.0.17-py3-none-any.whl

Download URL sindit-2.0.17-py3-none-any.whl
Size 2.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
285a719a3294ef9504a5da83815bd8b49cd5656b337d54a205bfd7f56f8349c7
BLAKE2b-256 checksum
How to use checksums
28fdc94452b42e151626dfca14ecceade29dcd31e51ca1ad41581e9415f24b88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.7

Security for sindit 2.0.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page