Git Product home page Git Product logo

pykrety's Introduction

pykrety
=======

Python wrapper around Geokrety.org website.

This is the first public version, things may change without notice.


Notes
=====

With `GeokretyConnector`, functions ending by _web use the website and
authenticate via cookies. Others use the API and authenticate via `secid`.


How to use
==========

First initialize the connector.
    gkConn = GeokretyConnector('myusername', 'mypassword')

Then, connect.
    gkConn.connect_web()
or
    gkConn.connect_api()

Retrieve your inventory.
    gkConn.get_inventory_web()
or
    gkConn.get_inventory()

Retrieve someone inventory (by userid)
    gkConn.get_inventory_web(1234)

You can save 'most' geokrety informations in CSV file
    gkConn.write_csv('/tmp/pykrety-out.csv')

Of course, you can read them from CSV
    gkConn.read_csv('/tmp/pykrety-out.csv')


You may want to create new Geokret ;)
    geokret = Geokret(name="My geokret")
    geokret.set_description("My geokret long description...")

    gkConn.create_geokret_web(geokret, logathome=True)
    
    # geokret new ID is set in object
    print geokret.gk_id


Some field could be updated
    geokret.set_description("My geokret has a new description")
    gkConn.update_geokret_web(geokret)


Pictures could be uploaded
    gkConn.upload_image_web(geokret, '/tmp/mygeokret_image.png',
                            description="The picture description",
                            avatar=True)


pykrety's People

Contributors

kumy avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.