Skip to main content

Mr. Pump is a twitter bot, using tweepy.

To use

  1. Install Mr. Pump.

  2. Set up an account for Mr. Pump on Twitter.

  3. Follow Pump’s account, and make him follow yours.

  4. Visit dev.twitter.com. Log in as your Pump user. Create a new ‘application.’

  5. Remember that only you are responsible for how you use or abuse Twitter.

  6. Get the developer access token for your app.

  7. Write a config file; we’ll call it golem.ini. (see below.)

  8. Run Mr. Pump:

    emet golem.ini
  9. Send a direct message to Mr. Pump, e.g. “19 ping.”

  10. Receive his reply: “927 pong.”

What are the numbers in the messages?

Just a way to get around Twitter’s “Whoops, you already said that!” message. It appears to be meant to prevent double posting. But when you are talking to computers you may need to repeat yourself more often than with people.

Config file

[app]
# OAuth info needed to log in. You get these two when you register your app -
key = ABCDEFGHijkl012345MNO
secret = gr0igh24g8h240gh2rvun92rnuEIIH847fhier00

# (this is the screen name of the bot)
[mygolem]
# - and you get these two when you get your developer access token.
token = 284729478-KANEFIIGRVKNRVO3883474KFKEVDKknvdvdkn993
secret = prgiIRGJIGkvmvvnkfkKNKRFNKFIFEIV48347fenef

# A name for the instance of the ping chem -
[ping]
# For the ping chem, use the 'ping' entry point from the 'mrpump' egg.
use = egg:mrpump#ping

# A name for the instance of the time chem -
[time]
# For this one use the 'time' entry point from the 'time_chem' egg
use = egg:time_chem#time
# Any additional config required by this chem
format = Year %Y month %m day %d

[global]
# A colon-separated list of directories wherein eggs containing chems are to be
# found.
plugin path = /home/me/mrpump-plugins
# This is the same as the section name above.
screen name = mygolem
# Name of a file that Mr. Pump can write in. Gets no larger than 10k.
cache = /tmp/already_seen
# How many seconds between checking messages. Don't make Twitter angry.
check every = 60
# debug, info, error: minimum level of messages to display. Debug is quite
# verbose.
log level = info
# Names of each section above that configures a chem.
chems = ping, time

Terminology

<http://en.wikipedia.org/wiki/Golems_(Discworld)>

Making Mr. Pump do cool stuff

Write a chem and put it in an egg. Then change your configuration to include it, and restart Mr. Pump. Presto, your new functionality is ready!

In the examples directory there is a time chem. To make it work, go in that directory, and run python setup.py bdist_egg. Put the egg file (dist/*egg) in a directory that’s on the configured plugin path. The [time] section in the example configuration above will load the time chem. Now run emet, and DM your bot, time.

Metadata

Release files for mrpump 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mrpump 0.2
File Size Uploaded Provenance
mrpump-0.2.tar.gz 6.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mrpump 0.2
File Interpreter ABI Platform
mrpump-0.2-py2.7.egg Legacy Egg format - - Details

Total release size: 20.3 kB

Release files / mrpump-0.2.tar.gz

Download URL mrpump-0.2.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
88b902091061ffcc4ef606e96ebd2f647d04f39385b00a3049e9c6f24b90f85c
BLAKE2b-256 checksum
How to use checksums
81c8bc20f62e776d371a4a407f03c778f918fa746148416dbc82e4d63481662e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mrpump-0.2-py2.7.egg

Download URL mrpump-0.2-py2.7.egg
Size 13.9 kB
Tags Egg
SHA-256 checksum
How to use checksums
e7199485f6b7377d5e30ffc04b59909aa49d8acbb8098241c998748bacfcbb1f
BLAKE2b-256 checksum
How to use checksums
2a21968bbf3e921e90dd4890737027f49011f009c290dc0485466c5ef461270c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for mrpump 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page