Prototype a Box Python library with a minimal connection to the UI and application
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KARL4 |
Fix Released
|
Medium
|
Chris Rossi |
Bug Description
We need to learn more about Box: what it does, how it does it, how we'll use it. Equally, we need to figure out how to drive it from Python, which might even mean making our own Python API.
This ticket is an R&D task. Make a new view in KARL with a single button. Click the button and a file is created in a pre-specified folder. Filename is something random (time.time()) and can contain the same HTML each click.
Along the way, investigate:
- What Python 2.x libraries exist and whether we have to write our own
- What knobs need to be in a config file
A second ticket in lp:1389230 describes a deeper dive on topics that will then lead to actual feature tickets. Neither of the R&D tickets will actually go into detail on specifics of how we are implementing this, as we are still learning.
description: | updated |
Changed in karl4: | |
assignee: | nobody → Chris Rossi (chris-archimedeanco) |
Changed in karl4: | |
status: | New → In Progress |
Changed in karl4: | |
status: | In Progress → Fix Committed |
I just made a new 'box' branch. It contains a view that lets you connect to a box account and upload and download files.
To use it, create or log in to your box account, then create an application:
https:/ /app.box. com/developers/ services/ edit/
It doesn't matter what it's called.
In Karl, switch to the box branch, and add 'box.client_id' and 'box.client_secret' to 'etc/karl.ini', using the values for your Box application.
Start Karl and visit, '/start_box'. It will create a 'box' object in the Karl db and redirect to a view of the box.
Notice that it tells you a redirect_url. Edit your application with the given redirect_url and save the application.
Then use the button provided in Karl to log in and connect Karl to your Box application.
Use the minimal UI to upload and download files.
That's it!