Skip to main content

Asana

Project description

asana-preview PyPi Version

This is the interface for interacting with the Asana platform

  • Package version: 1.0.1

Requirements.

Python >=3.6

Installation & Usage

pip install

pip install asana-preview

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asana-preview-1.0.1.tar.gz (99.9 kB view details)

Uploaded Source

Built Distribution

asana_preview-1.0.1-py3-none-any.whl (339.9 kB view details)

Uploaded Python 3

File details

Details for the file asana-preview-1.0.1.tar.gz.

File metadata

  • Download URL: asana-preview-1.0.1.tar.gz
  • Upload date:
  • Size: 99.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for asana-preview-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3efe02c69a08e0436c59f7b696b1f0dc8874aae6cb97d85ecaecc76171a73b6e
MD5 c4a8a1a9ea4f298b98875f5d4f53cb94
BLAKE2b-256 a25facd1ebc48d8248b3facdbc56432f8a28a2801011f45d1680ab41d67890af

See more details on using hashes here.

File details

Details for the file asana_preview-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for asana_preview-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf0245de6c30090020882cf8d09c3b0499e007a07083cbae0c6a0d046a8cd1f
MD5 e5a646b1cc4960f2ca0a0985e638eb47
BLAKE2b-256 8f0304cc662edd5aedc7ecd491e7e546583ab803ca933a2e35289c581793e99c

See more details on using hashes here.

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