semvec/pypi-packages huggingface dataset:
facebooklogger 0.2.4
A logging handler that sends you log entries on Facebook Messenger
Requires Python: >=3.6

# Facebook Logger

A logging handler that sends you log entries on Facebook Messenger

```python
import logging
from facebooklogger import FacebookLogger
logger = logging.getLogger("Home Server")
logger.setLevel(logging.INFO)
fb = FacebookLogger(level=logging.INFO)
logger.addHandler(fb)

logger.info("Server Started")
logger.warning("Something might be wrong")
logger.error("EVERYTHING IS ON FIRE")
```
![Screenshot 1](https://github.com/jackadamson/facebooklogger/raw/master/images/screenshot1.png)

## Getting Started


Install facebooklogger with
```bash
pip install facebooklogger
```

To use the Facebook logger, you will need to create a Facebook page and get two pieces
of information. A Page Access Token to authenticate as the page, and the User ID you
want logs sent to.

### Configuration

The logger requires two configuration options set:
- `PAGE_ACCESS_TOKEN`
- `FB_USER_ID`

They can be provided as environment variables, or by creating a file called `.env` in
the working directory that looks like:
```.env
PAGE_ACCESS_TOKEN=ABCDEFGH12345abcefweeaABCDEFGH12345abcefweeaABCDEFGH12345abcefweeaABCDEFGH12345abcefweeaABCDEFGH12345abcefweeaABCDEFGH12345abcefweeaABCDEFGH12345abcefweeaABCDEFGH12345abcefwe
FB_USER_ID=1234567891234567
```
Replacing the token and user ID with your own obtained below

### Page Access Token

Note that to use this logger you DO NOT need to have your app verified by Facebook, you
can just stay in development mode.

Follow the getting started section of  
https://developers.facebook.com/docs/messenger-platform/getting-started/quick-start

### User ID

Facebook Page IDs are unique to the page, and as such if you change page you will need
to re-acquire the user id.  
Note: You will have to already have the page access token  

To get user id, run the following
```bash
PAGE_ACCESS_TOKEN=YOURTOKEN python3 -m facebooklogger
```
and follow the prompts
fwx 0.0.11
fwx isn't a framework, it's a library.

# fwx

fwx isn't a framework, it's a library.

fwx is used for the same kinds of applications as frameworks like Django or
Flask, but it works differently. Frameworks make you write code that the
framework then calls: the tool is using your code, not the other way
around. fxw is primarily a collection of functions, which you call from your
code. This way you're using the tool: the correct order of things.

## Installation

    pip install fwx
dmfrbloom 0.0.7
Bloom filters with the standard library
Requires Python: >=3.6

# dmfrbloom
Bloom filters with Python standard library.

## Examples
Normal bloom filter. Expects 10,000 elements with 99.99% accuracy:
```
>>> from dmfrbloom.bloomfilter import BloomFilter
>>> bf = BloomFilter(10000, 0.01)
>>> bf.add("test")
>>> bf.lookup("test")
True
>>> bf.lookup("not in filter")
False
>>> bf.save("/home/daniel/filter")
>>> bf2 = BloomFilter(1, 0.1)
>>> bf2.load("/home/daniel/filter")
>>> bf2.lookup("test")
True
>>> bf2.lookup("also not in filter")
False
```

Time-based filter. 10k elements, 99.99% accuracy, results decay after
60 seconds:
```
>>> from dmfrbloom.timefilter import TimeFilter
>>> tf = TimeFilter(10000, 0.01, 60)
>>> tf.add("asdf")
>>> tf.lookup("asdf")
True
>>> import time
>>> time.sleep(60)
>>> tf.lookup("asdf")
False
```