Python client for Socialhome
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
shcli
snap
tests
.coveragerc
.gitignore
.travis.yml
CHANGELOG.md
LICENSE.txt
MANIFEST.in
README.md
dev-requirements.txt
setup.cfg
setup.py

README.md

Build Status codecov.io Dependency Status

snap PyPI version PyPI PyPI

chat on freenode Chat on Gitter chat on matrix

shcli

Python client for Socialhome.

Introduction

Interact with your Socialhome account using the shcli client. This library will provide a CLI utility and a Python API.

Installation

From PyPi

pip install shcli

As a Snap

# For example on Ubuntu. See https://snapcraft.io/ for support on other OS's.
sudo snap install shcli 

Usage

Tool help:

shcli --help

Creating content

Tool

shcli create <domain.tld> <token> -t <text> -v <visibility>

For example:

shcli create socialhome.network 123456789abcdefg -t 'Hello, World!' \
    -v public

Python API

import shcli

shcli.create(<domain.tld>, <token>, <text>, <visibility>)

For example:

shcli.create(
    "socialhome.network", "123456789abcdefg", "Hello, World!", "public"
)

Visibility parameter can be one of public, limited, site or self.

Returns the created Content object as JSON or another response with possible error messages.

Development

Install for development

pip install -U -r dev-requirements.txt

Running tests

py.test

License

MIT

Author

Jason Robinson / https://jasonrobinson.me / https://github.com/jaywink