# legos.fact-sphere
[]() []() []()
[]() []() []()
Fetch a random "fact" from the Portal2 Fact Sphere
## Usage
- `!fact` returns a random fact
## Installation
You can install locally (by cloning the repo) or from PyPi
### Local
cd into the current directory
`pip3 install .`
### From PyPi
`pip3 install legos.fact_sphere`
### Add to Legobot
This is a Lego designed for use with [Legobot](https://github.com/Legobot/Legobot), so you'll get Legobot along with this. To deploy it, import the package and add it to the active legos like so:
```python
# This is the legobot stuff
from Legobot import Lego
# This is your lego
from legos.fact_sphere import FactSphere
# Legobot stuff here
lock = threading.Lock()
baseplate = Lego.start(None, lock)
baseplate_proxy = baseplate.proxy()
# Add your lego
baseplate_proxy.add_child(FactSphere)
```
## Tweaking
While you can use this one as-is, you could also add a localized version to your Legobot deployment by grabbing [fact_sphere.py](legos/fact_sphere.py) and deploying it as a local module. [Example of a Legobot instance with local modules](https://github.com/voxpupuli/thevoxfox/)
## Contributing
As always, pull requests are welcome.
[]() []() []()
[]() []() []()
Fetch a random "fact" from the Portal2 Fact Sphere
## Usage
- `!fact` returns a random fact
## Installation
You can install locally (by cloning the repo) or from PyPi
### Local
cd into the current directory
`pip3 install .`
### From PyPi
`pip3 install legos.fact_sphere`
### Add to Legobot
This is a Lego designed for use with [Legobot](https://github.com/Legobot/Legobot), so you'll get Legobot along with this. To deploy it, import the package and add it to the active legos like so:
```python
# This is the legobot stuff
from Legobot import Lego
# This is your lego
from legos.fact_sphere import FactSphere
# Legobot stuff here
lock = threading.Lock()
baseplate = Lego.start(None, lock)
baseplate_proxy = baseplate.proxy()
# Add your lego
baseplate_proxy.add_child(FactSphere)
```
## Tweaking
While you can use this one as-is, you could also add a localized version to your Legobot deployment by grabbing [fact_sphere.py](legos/fact_sphere.py) and deploying it as a local module. [Example of a Legobot instance with local modules](https://github.com/voxpupuli/thevoxfox/)
## Contributing
As always, pull requests are welcome.
Release files for legos.fact-sphere 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| legos.fact_sphere-0.2.2.tar.gz | 8.1 kB | Details |
Release files / legos.fact_sphere-0.2.2.tar.gz
| Download URL | legos.fact_sphere-0.2.2.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afa45895340b378d26cce95a7c8eac8d3c2a4030e047d0c28f23c5d10a2fe8d9
|
|
BLAKE2b-256 checksum How to use checksums |
7c2f019f5fed41f736ee97fad4e2b7f7b7714bd80b9426ecc85a065132bfbb6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.6
|