Skip to main content

UNKNOWN

Project description

This is api connector to Pripravto.cz service for furniture makers. You should be able to use it to create your custom designs for furniture, download data and eventually build your partial interface.

Get started

For instalation you can download package and then just unpack package from https://pypi.python.org/pypi/ocapi and use it:

#download archive
wget https://bitbucket.org/pripravto/ocapi/get/default.tar.gz
cd /tmp
virtualenv test
source test/bin/activate
tar -xvf default.tar.gz
#specify correct name
cd pripravto....

Instalation:

python setup.py install

or install by pip:

pip install ocapi

Quickstart

First you should get your account on https://pripravto.cz service, when you will have it Login normally into service. Then you can start by opening Python console and importing ocapi:

import ocapi.api as oc
import math
args = {'name':'test2','position':[0,0,0],'size':[1000,1000,1000]}
#set your user credentials here
prod = oc.CabinetMaker(args, username="test",password="test")
for i in range(36):
    size = [18,math.sin(math.radians(i*10))*50+80,18]
    rot = [0,0,10+i*2]
    prod.add_element(pos=[i*20,0,0],size=size,rot=rot)
prod.finish()

This is partial example which will show you base usage of this api. This will create serries of elements which are sized by sin function and rotated by series of iteration.

To build something more usefull you can make first base cabinet by just writing down one function:

args = {'name':'cabinet2','position':[0,0,0],'size':[600,600,1000]}
prod.parse_args(args)
#build our base parts
prod.add_basic()
#add doors
prod.add_doors()
prod.finish()

After data creation you can also check what kind of data you have created on service itself and also download images and so on.

Username and password are specified at start of object:

prod = oc.CabinetMaker(args, username="test",password="test", host="test.pripravto.cz")
#your username and password is from https://pripravto.cz/register/start

For complete registration process you need your functional e-mail address and fill out data required by registration. You should keep your user credentials secret. For examples what can be built on this api connector take a look on http://pripravto.cz/en/blog where we put examples.

More documantation for pripravto service or about this plase see web page or oc.CabinetMaker class.

Contact

You can contact us or raise issues on https://bitbucket.org/pripravto/ocapi Developmnet is also made on Bitbucket.

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

ocapi-0.5-3.tar.gz (14.8 kB view hashes)

Uploaded Source

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