Skip to main content

Configuration

Parascope is configured via environment variables defined in a .env file in the project root. You can start by copying the provided example:

cp .env.example .env

Below is a reference of all available configuration options.

General Configuration

VariableDefaultDescription
SERVER_HOSTNAMElocalhostThe hostname where the server is running.
PROJECT_NAMEParascopeThe name of the project, used in titles and metadata.
DEBUGtrueEnable debug mode for more verbose logging.

Frontend Configuration

VariableDefaultDescription
FRONTEND_PORT3000The port where the React frontend application will be served.
VITE_API_BASE_URLCalculated(Optional) URL of the backend API. Defaults to http://${SERVER_HOSTNAME}:${BACKEND_PORT}.

Backend Configuration

VariableDefaultDescription
BACKEND_PORT8000The port where the FastAPI backend will be served.
BACKEND_CORS_ORIGINSCalculated(Optional) Comma-separated list of allowed CORS origins. Defaults to frontend URLs.
DATABASE_URLExampleConnection string for the PostgreSQL database.
UPLOAD_DIRuploadsDirectory to store uploaded files.
LOCK_TIMEOUT_SECONDS604800Duration (in seconds) before a sheet lock expires (Default: 7 days).
WORKER_COUNT5Number of worker processes in the execution pool.

Execution Environment

VariableDefaultDescription
EXTRA_ALLOWED_MODULESscipyComma-separated list of additional Python modules allowed in the sandbox.
EXTRA_PRELOAD_MODULES(Empty)Comma-separated list of modules to preload in worker processes for faster startup.

Login & Auth

VariableDefaultDescription
USERNAME_REGEX^[a-zA-Z0-9_ ]+$Regex pattern to validate usernames.
USERNAME_DESCRIPTIONDescriptionHuman-readable description of valid username formats.

AI Providers

Configure generative AI providers for the "Generate Function" feature.

VariableDefaultDescription
DEFAULT_AI_PROVIDERgeminiThe default provider to use (gemini, openai, bedrock).

Google Gemini

  • GEMINI_API_KEY: Your Google Gemini API Key.
  • GEMINI_MODEL: Model name (e.g., gemini-pro).

OpenAI

  • OPENAI_API_KEY: Your OpenAI API Key.
  • OPENAI_MODEL: Model name (e.g., gpt-4o).

Amazon Bedrock

  • AWS_ACCESS_KEY_ID: AWS Access Key.
  • AWS_SECRET_ACCESS_KEY: AWS Secret Key.
  • AWS_REGION: AWS Region (e.g., us-east-1).
  • BEDROCK_MODEL_ID: Model ID (e.g., anthropic.claude-3-sonnet...).