Asana
Project description
asana-preview
This is the interface for interacting with the Asana platform
- Package version: 1.0.0
Requirements.
Python >=3.6
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import asana_preview
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import asana_preview
Getting Started
Please follow the installation procedure and then run the following:
import asana_preview
from asana_preview.api import users_api
from pprint import pprint
# Configure Bearer authorization: personal_access_token
configuration = asana_preview.Configuration(
access_token = 'PERSONAL_ACCESS_TOKEN'
)
# Enter a context with an instance of the API client
with asana.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = users_api.UsersApi(api_client)
user_gid = "me" # str | A string identifying a user. This can either be the string "me", an email, or the gid of a user.
opt_fields = ["email", "name", "workspaces"] # [str] | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The gid of included objects will always be returned, regardless of the field options. (optional)
# Example passing only required values
try:
# Get a user
user = api_instance.get_user(user_gid)
pprint(user)
except asana.ApiException as e:
print("Exception when calling UsersApi->get_user: %s\n" % e)
# Example using opt_fields
try:
# Get a user with opt_fields
user = api_instance.get_user(user_gid, opt_fields=opt_fields)
pprint(user)
except asana.ApiException as e:
print("Exception when calling UsersApi->get_user: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://app.asana.com/api/1.0
Class | Method | HTTP request | Description |
---|---|---|---|
EventsApi | get_events | GET /events | Get events on a resource |
ProjectsApi | get_project | GET /projects/{project_gid} | Get a project |
ProjectsApi | get_projects | GET /projects | Get multiple projects |
SectionsApi | get_sections_for_project | GET /projects/{project_gid}/sections | Get sections in a project |
StoriesApi | get_stories_for_task | GET /tasks/{task_gid}/stories | Get stories from a task |
TasksApi | get_subtasks_for_task | GET /tasks/{task_gid}/subtasks | Get subtasks from a task |
TasksApi | get_task | GET /tasks/{task_gid} | Get a task |
TasksApi | get_tasks | GET /tasks | Get multiple tasks |
TasksApi | get_tasks_for_project | GET /projects/{project_gid}/tasks | Get tasks from a project |
UsersApi | get_user | GET /users/{user_gid} | Get a user |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file asana-preview-1.0.0.tar.gz
.
File metadata
- Download URL: asana-preview-1.0.0.tar.gz
- Upload date:
- Size: 99.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee1788e9639bf913911b16237b1251f1039f8f32b6dfd3aad3238d526b309da0 |
|
MD5 | c03d58100b0abc3b220a682c294bfc79 |
|
BLAKE2b-256 | f270bdb91e5da31581cb8ec4c4a2de6a6aed6a30b18e647dd52e0cc5e367763d |
File details
Details for the file asana_preview-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: asana_preview-1.0.0-py3-none-any.whl
- Upload date:
- Size: 339.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6ea0ee1a8ea10fc7c31aa7377e4d30a6f5471745f1180c1fdbb6207aeb9957e |
|
MD5 | 513c56f63e2d0544e1728f625e2721a1 |
|
BLAKE2b-256 | 432d28fcfdf01392d57e68fb8014c259bc5653c462760bda47d7991ac77337a1 |