Skip to main content

scheduler for python scripts

Project description

Skidward

Scheduler For Python Scripts

Prerequisites

The project was built with Python 3.6.7 and requires a working Postgres and Redis setup.
Please refer to your operating system's specific installation instructions per package.

  • Python 3.6.7
  • Postgres (tested on 11 and up)
  • Redis (tested on 5 and up)

Installation

  • Install the requirements

      $ pip install -r requirements.txt
    
  • Create user (called a 'role') in postgres and give it ownership over the new db Note: It is recommended to create a user with a password, even for development purposes.

      $ createuser skidwarduser
      $ createdb skidwarddb -O skidwarduser
    

The application uses environment variables to offer flexible configuration options.
Before using the application, review the configuration in the .env file to match your desired setup.
A typical connectionstring looks like this: SQLALCHEMY_DATABASE_URI='postgresql://USER:PASSWORD@localhost/DATABASENAME'

  • Copy the .env.default file to the skidward module and rename to .env.

      $ cp .env.default skidward/.env
    
  • Publish available workers on the namespace in the database

      $ python -m skidward publish-workers
    
  • Create an admin user for use in the application

      $ python -m skidward create-admin USER_EMAIL
    

Development

  • Install the development requirements

      $ pip install -r requirements-dev.txt
    
  • Set up the git pre-commit hook required for development

      $ pre-commit install
    

Optional: If you want to install demo-workers from a proxy, navigate to the root of your virtual environment and create a pip.conf file.

    $ touch pip.conf
    $ echo "[global]" >> pip.conf
    $ echo "extra-index-url = URL_TO_PROXY" >> pip.conf

Running the application

There's an admin interface provided to communicate with the application,
and then there's the backend side doing the operations.

1. Web interface

  • Point Flask to the location of the web application

      $ export FLASK_APP=skidward.web
    
  • Run the default setup (in the same session as the previous command)

      $ flask run
    

2. Scheduler side

  • Start a new scheduler process (in the fore- or background)

      $ python -m skidward start-scheduler        # Runs in your session
      $ python -m skidward start-scheduler true   # Creates a new process running in the background
    

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skidward-0.0.1.dev350.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skidward-0.0.1.dev350-py2.py3-none-any.whl (18.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file skidward-0.0.1.dev350.tar.gz.

File metadata

  • Download URL: skidward-0.0.1.dev350.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7

File hashes

Hashes for skidward-0.0.1.dev350.tar.gz
Algorithm Hash digest
SHA256 9ecffa5e69c5e1e820a953d92ac1230bbbd51ef9b77ca022dddb48547998757f
MD5 1dedc2b9eb0ed98861a562c77f6ecb70
BLAKE2b-256 a516e3b3983dbb9625a498c2cca1b0868e53700e715554228cacdc822f3118c4

See more details on using hashes here.

File details

Details for the file skidward-0.0.1.dev350-py2.py3-none-any.whl.

File metadata

  • Download URL: skidward-0.0.1.dev350-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7

File hashes

Hashes for skidward-0.0.1.dev350-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f30c08e2adc8b73ca5d4e17f7134dbc30fea8c3241ab70b94e3e2dfc60b4ea5a
MD5 fba33f042f425a7ef7d80404316d3729
BLAKE2b-256 d12fd85b9b6ea053564b3b582d8cb7a103c95d04c5a696dee0346098be83a585

See more details on using hashes here.

Supported by

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