Skip to main content

Introduction

Overview

This package is where we keep all of the core features of Dara, from allowing you to start your app to creating interactive pages, handling of data and much more!

Please explore the reference section as well as the guides under User Guide to learn about all the different features available.

Getting Started

Example basic app

from dara.core import ConfigurationBuilder


# Here we initialize the app config, which uses a Builder pattern to
# build up the app piece by piece.
config = ConfigurationBuilder()

# Here we add a single page to the application, with a title of 'Hello'
# and the text 'World' on the page.
config.add_page('Hello', content='World')

Environment Variables

Dara has some Environment Variables which you may be interested to set:

  • CLDP_POOL_MAX_WORKERS - Specifies the number of worker processes to use. Default to number of CPUs minus one (with a minimum of 1).
  • CLDP_NUM_COMPONENT_THREADS - Specifies a limit to the number of threads that can be run by the pool responsible for user-provided sync functions at once. Defaults to 8.
  • JWT_SECRET - Specifies the JWT secret key.
  • LIMIT_MAX_REQUESTS - Specifies a limit to kill the server after X requests. Defaults to `None`.
  • STATIC_URL - Specifies where the static files are mounted at in the router. Defaults to `'/static/'`.