Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nitric

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nitric

The Nitric SDK for Python 3

  • 1.2.4
  • PyPI
  • Socket score

Maintainers
1

Nitric Logo

Build nitric applications with Python

Build Status Codecov Version Downloads/week Discord

The Python SDK supports the use of the Nitric framework with Python 3.11+. For more information check out the main Nitric repo.

Python SDKs provide an infrastructure-from-code style that lets you define resources in code. You can also write the functions that support the logic behind APIs, subscribers and schedules.

You can request the type of access you need to resources such as publishing for topics, without dealing directly with IAM or policy documents.

Usage

Starting a new project

Install the Nitric CLI, then generate your project:

nitric new hello-world py-starter

Add to an existing project

First of all, you need to install the library:

pip

pip3 install nitric

pipenv

pipenv install nitric

Then you're able to import the library and create cloud resources:

from nitric.resources import api, bucket
from nitric.application import Nitric
from nitric.context import HttpContext

publicApi = api("public")
uploads = bucket("uploads").allow("write")

@publicApi.get("/upload")
async def upload(ctx: HttpContext):
    photo = uploads.file("images/photo.jpg")

    url = await photo.upload_url()

    ctx.res.body = {"url": url}

Nitric.run()

Learn more

Learn more by checking out the Nitric documentation.

Get in touch:

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc