Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.
/ genesis-pyapi Public archive

GenAPI is a Python API for the Genesis platform.

License

Notifications You must be signed in to change notification settings

genialis/genesis-pyapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Genesis PyAPI

Python API for the Genesis platform.

Install

To install, run:

python setup.py install

To install for development, run:

python setup.py develop

Usage

Create an API instance:

from genesis import Genesis
gen = Genesis()

Get all project and select the first one:

projects = gen.projects()
project = list(projects.values())[0]

Get expression objects and select the first one:

expressions = project.data(type__startswith='data:expression:')
expression = expressions[0]

Print annotation:

expression.print_annotation()

Print file fields:

expression.print_downloads()

Download file:

filename = expression.annotation['output.exp']['value']['file']
resp = expression.download('output.exp')
with open(filename, 'w') as fd:
    fd.write(resp.content)

About

GenAPI is a Python API for the Genesis platform.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages