https://github.com/danmichaelo/wikidataeditor
Basic Wikidata editor
https://github.com/danmichaelo/wikidataeditor
Last synced: 12 days ago
JSON representation
Basic Wikidata editor
- Host: GitHub
- URL: https://github.com/danmichaelo/wikidataeditor
- Owner: danmichaelo
- License: unlicense
- Created: 2014-06-15T13:44:33.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-11-08T22:18:12.000Z (over 10 years ago)
- Last Synced: 2026-03-02T02:30:41.020Z (4 months ago)
- Language: Python
- Size: 176 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
.. image:: https://travis-ci.org/danmichaelo/wikidataeditor.svg?branch=master
:target: https://travis-ci.org/danmichaelo/wikidataeditor
Rename to wbclient??
Other libraries: jcreus/pywikidata , wikimedia/pywikibot-core
Basic Python Wikidata-editor adhering to PEP8 and making use of quality libraries such as `Requests`.
pip install curdling
curd install -r requirements.txt
Example:
.. code:: python
import sys
from wikidataeditor import Repo
wd = Repo('MyAwesomeTool/0.1 (+http://tools.wmflabs.org/myawesometool)') # Specifying our user-agent
if not wd.login('username', 'verysecretpassword'):
print 'Login failed'
sys.exit(1)
item = wd.item('Q5')
print item.label('nb', ('nn','en'))
print item.description('nb', ('nn','en'))
for claim in item.claims('P31'):
print claim
```