Skip to content

Legobot/legos.stocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Legobot Stocks

Travis PyPI PyPI

PyPI PyPI PyPI

Usage

The stocks package actually contains two legos: stocks, which reads ticker symbols, and cryptocurrency which looks up cryptocurrency symbols such as BTC.

The usage for both is similar:

!stocks APPL !crypto BTC

Installation

pip3 install legos.stocks

This is a Lego designed for use with Legobot, so you'll get Legobot along with this. To deploy it, import the package and add it to the active legos like so:

# This is the legobot stuff
from Legobot import Lego
# This is your lego
from legos.stocks import Stocks
from legos.stocks import Cryptocurrency

# Legobot stuff here
lock = threading.Lock()
baseplate = Lego.start(None, lock)
baseplate_proxy = baseplate.proxy()

# Add your lego
baseplate_proxy.add_child(Stocks)
baseplate_proxy.add_child(Cryptocurrency)

Tweaking

While you can use this one as-is, you could also add a localized version to your Legobot deployment by grabbing stocks.py or cryptocurrency.py and deploying is as a local module. Example of a Legobot instance with local modules

Contributing

As always, pull requests are welcome.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages