Skip to main content

Python interface to Carta.

Project description

Summary

The goal behind pycarta is to simplify administrative actions, such as assigning user permission, creating groups, and registering services, requiring authentication, setting up and calling Carta services.

Many projects restrict who has access to information or analyses. pycarta makes enforcing those access controls simple and painless. While pycarta has many other uses, one of the most important allows you, the developer, to control who has permission to execute your code using the @pycarta.authorize decorator.

import pycarta

@pycarta.authorize(groups=["MyOrg:MyGroup"])
def my_function(*args, **kwds):
    # Code you want to protect.
    pass

Anyone not authorized to run my_function will receive an AuthenticationError. Other functions, such as those defined in administrative_tasks{.interpreted-text role="ref"} can be used to setup who ultimately falls within these permissions.

Definitions

Throughout, this documentation will refer to a number of Carta-specific concepts and, while every effort has been made to remain true to the prima facia meaning of terms, there are some nuances that may be important in certain circumstances.

Group

One or more users may form a group. This is particularly useful for
assigning permissions to various Carta resources.

Resource

Carta resources include authentication, projects, secrets, and
services. Some, specifically projects and services, can be shared
using the Carta permission system. Others (authentication and
secrets) are specific to the user and cannot be shared.

Permissions

As with other permission systems, Carta Permisions allows owners to
share access to resources with other users, with groups, and even
with other resources based on the users\' roles. Each resource will
have exactly one owner, but other users may be granted admin, read,
write, execute, and clone permissions. An *admin*, like the owner,
may grant or rescind permission to anyone (except the owner). *read*
and *write* permissions have their obvious meaning. *execute*
permissions, which is particularly relevant to services, determine
whether a user can make a call to (execute) the action accessible
through the service API. Finally, *clone* permissions allow select
resources to be duplicated, similar to forking a repository.

Project

Projects are the basic unit of organization in Carta. While not
required, projects generally correlate to an organization.

Secrets

Carta provides a secure method for temporarily storing small
secrets, such as usernames, passwords, tokens, etc. and are useful
for accessing third-party resources. Because of their sensitive
nature, secrets may not be shared between users.

Service

A central function for Carta is to act as a proxy that abstracts
away the details of a backend, third-party resource. Services are
APIs exposed and authenticated through Carta. These are scoped with
a `namespace`, which must be unique across the Carta platform, and a
`service`, the name of the service. The functionality of the service
is exposed through
`https://carta.contextualize.us.com/<namespace>/<service>/{endpoints}`.

User

A user is someone who has registered an account with Carta.

Feature Request/Bug-Fix

For login issues, please contact customer.service@contextualize.us.com.

To request a new feature or to report a bug, please email pycarta. Please be sure to describe the goal of the new feature or, for a bug report, a minimum code that reproduces the error. Note that if you submit a feature request or bug report, the developers reserve the right to contact you about that request.

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

pycarta-0.2.4rc1.tar.gz (865.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycarta-0.2.4rc1-py3-none-any.whl (38.8 kB view details)

Uploaded Python 3

File details

Details for the file pycarta-0.2.4rc1.tar.gz.

File metadata

  • Download URL: pycarta-0.2.4rc1.tar.gz
  • Upload date:
  • Size: 865.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pycarta-0.2.4rc1.tar.gz
Algorithm Hash digest
SHA256 5287aaeaa163ade93124b31b0a72ae0b64b0fe5887b7b0c14e83237b004b5ce7
MD5 7067f809a5d7c9a5dbace5f6ebee73c5
BLAKE2b-256 a75fee910f407c2b1258ea148caa3cec203c4ecec4143bcb38875380d41e4498

See more details on using hashes here.

File details

Details for the file pycarta-0.2.4rc1-py3-none-any.whl.

File metadata

  • Download URL: pycarta-0.2.4rc1-py3-none-any.whl
  • Upload date:
  • Size: 38.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pycarta-0.2.4rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2b99af6597f25b4a5190dd22c522e4b64bd9ac1447aae18d0cf454650500087
MD5 8c440cc80cfb921d09d0cd9839bca3ad
BLAKE2b-256 d819caa2917a1dfef4d6f9e31cfb6e979bed3d06cb54eba6490d47ae37b492e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page