Skip to main content

Wx Twitter Bot

Project description

Release

Wx Twitter Bot

A bot that tweets about the weather.

Capabilities

  • Solar Times (sunrise, noon, sunset)
  • Lunar Times (moonrise, illumination, moonset)
  • Air Quality

Quick Start

In order to use this application with Twitter, developer credentials are required. Get them here.

Command Line

To run this application via the command line, execute the following from the project root directory:

python src/main.py [options]

Options:

Name Description
--app-root Path to the application root directory which contains the .env file.

Docker

This application can be run in a docker container using a published image.

For example:

docker pull ghcr.io/karjanme/wx-twitter-bot:latest

Configure the TZ environment variable when setting up the container.

Required volume mapping:

Volume Description
/app Must point to a directory on your host which contains the .env file.
The appliation will create subdirectories to facilitate runtime needs.

Environment Variables

The following variables can be set using a .env file placed in the application root directory.

Name Description
LOG_LEVEL (optional) Specifies the level of logging to use when executing the application (Default = "INFO")
LOCATION A label for the location associated the this instance of the application
REGION A label for the location's region associated with this instance of the application
TIMEZONE The timezone name for the location associated with this instance of the application from the "tz database"
LATITUDE The latitude for the location associated with this application, decimal format
LONGITUDE The longitude for the location associated with this application, decimal format
AIR_NOW_API_KEY The key for the AirNow API
TWITTER_CONSUMER_KEY The consumer key for the Twitter API
TWITTER_CONSUMER_SECRET The consumer secret for the Twitter API
TWITTER_ACCESS_TOKEN The access token for the Twitter API
TWITTER_ACCESS_TOKEN_SECRET The access token secret for the Twitter API
TWITTER_BEARER_TOKEN The bearer token for the Twitter API
TWITTER_HASHTAG (optional) Text to be appended to all tweets as a hashtag

License

MIT License

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

wxtwitterbot-1.3.2-py3-none-any.whl (14.7 kB view hashes)

Uploaded Python 3

Supported by

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