Browse Source

updated README + Makefile

pull/1/merge
Rossen Georgiev 10 years ago
parent
commit
2e8280824d
  1. 39
      Makefile
  2. 28
      README.rst

39
Makefile

@ -0,0 +1,39 @@
define HELPBODY
Available commands:
make help - this thing.
make init - install python dependancies
make test - run tests and coverage
make pylint - code analysis
make build - pylint + test
endef
export HELPBODY
help:
@echo "$$HELPBODY"
init:
pip install -r requirements.txt
test:
rm -f .coverage steam/*.pyc tests/*.pyc
PYTHONHASHSEED=0 nosetests --verbosity 2 --with-coverage --cover-package=steam
pylint:
pylint -r n -f colorized steam || true
build: pylint test
clean:
rm -rf dist steam.egg-info steam/*.pyc
dist: clean
python setup.py sdist
python setup.py bdist_wheel --universal
register:
python setup.py register -r pypi
upload: dist register
twine upload -r pypi dist/*

28
README.rst

@ -0,0 +1,28 @@
Module for interacting with various Steam_ features
SteamID
-------------
.. code:: python
>>> from steam import SteamID
>>> SteamID()
SteamID(id=0, type='Invalid', universe='Invalid', instance=0)
>>> SteamID(12345) # accountid
>>> SteamID('12345')
SteamID(id=12345, type='Individual', universe='Public', instance=1)
>>> SteamID(103582791429521412) # steam64
>>> SteamID('103582791429521412')
>>> SteamID('[g:1:4]') # steam3
SteamID(id=4, type='Clan', universe='Public', instance=0)
# vanity urls are resolved by making an HTTP request
>>> SteamID('https://steamcommunity.com/id/drunkenf00l')
>>> SteamID('http://steamcommunity.com/profiles/76561197968459473') # no request is made
SteamID(id=8193745, type='Individual', universe='Public', instance=1)
.. _Steam: http://steampowered.com/
Loading…
Cancel
Save