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 details)

Uploaded Python 3

File details

Details for the file wxtwitterbot-1.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for wxtwitterbot-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f83e1fe20389fc135ebabf7c0395d62ca06355ddeaefafbae265639a44f4007f
MD5 b4eb81c775554a84f5a73235b8b79617
BLAKE2b-256 2ed69546995fdb76c5a2b5457480768102869c43cc634a79fa2880933c4b76a6

See more details on using hashes here.

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