Skip to main content

Python binding to Hackmud's chat API

Project description

hackmud_chat (Unofficial)
-------------------------

###### Installation
Just `pip install hackmud_chat`

Learn by example:
``` python
>>> from hackmud_chat import Account

# 'Login' to the hackmud chat API
>>> account = Account(token='yourtokenhere')

# Don't have a token? No panic...
# Get into your hackmud client and enter the command chat_pass
>>> account = Account(passwd='thegivenpass')

# Account's properties:
>>> account.users
>>> account.token

# Get the user you want to interact with
>>> user1 = account.get_user('user1')

# User's properties:
>>> user1.messages
>>> user1.channels

# Deeper, inside channels:
>>> user1.channels[0].users # The list of channel's members

# Access user's messages (sorted by time [latest == earliest])
>>> last = user1.messages[-1]

# Message object:
>>> last.id
>>> last.time
>>> last.from_user
>>> last.text
>>> last.to_user # Optional
>>> last.channel # Optional
>>> last.is_join # Optional
>>> last.is_leave # Optional

# Update messages:
>>> user1.update_history() # Updates user1.messages

# User's actions:
>>> user1.tell('user2', 'Hello') # Send a private message to user2
>>> user1.say('0000', 'H1 3vry0ne!') # Send a message to channel 0000
>>> user1.sayTo('0000', 'user2', "You're a noob!") # Send a message to chan 0000 formated like:
# @user2: You're a noob!
```

See some examples in [examples/](./examples/)

Documentation is coming...


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hackmud_chat-0.1a4.tar.gz (3.6 kB view details)

Uploaded Source

Built Distributions

hackmud_chat-0.1a4-py2.7.egg (7.3 kB view details)

Uploaded Source

hackmud_chat-0.1a4-py2-none-any.whl (4.9 kB view details)

Uploaded Python 2

File details

Details for the file hackmud_chat-0.1a4.tar.gz.

File metadata

  • Download URL: hackmud_chat-0.1a4.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.5

File hashes

Hashes for hackmud_chat-0.1a4.tar.gz
Algorithm Hash digest
SHA256 d568c804e27f00235e46e328093fd1cf7ae1210413be255f60b8e35a813f267c
MD5 e11ef33b921ca8866b6734997f37430e
BLAKE2b-256 7eedbe18afedca0cb0d1225eacd732b412226da804b4b2d09a63817e111883af

See more details on using hashes here.

File details

Details for the file hackmud_chat-0.1a4-py2.7.egg.

File metadata

  • Download URL: hackmud_chat-0.1a4-py2.7.egg
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.5

File hashes

Hashes for hackmud_chat-0.1a4-py2.7.egg
Algorithm Hash digest
SHA256 b8111547dc3bd8866398763bac21c00923d0030020b1e720d5336c383105fdab
MD5 65ded5e3dd87751239fcfb06e023068f
BLAKE2b-256 f438802087f96999e0babf44d3603d8bb3e753c83c96f476cffdb54ecf1ea844

See more details on using hashes here.

File details

Details for the file hackmud_chat-0.1a4-py2-none-any.whl.

File metadata

  • Download URL: hackmud_chat-0.1a4-py2-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.5

File hashes

Hashes for hackmud_chat-0.1a4-py2-none-any.whl
Algorithm Hash digest
SHA256 b14cf0b5bd1f93f9fc2612794ea60024c72c2f372203b395696f77c65d27d3df
MD5 de8e2560c59dac70065bbb76d47533af
BLAKE2b-256 dc3e2a90f5b62511afc301f62d0b98be84e2fa21e3008fe6d0b29e0ad0bb5be3

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