Skip to content

Commit c4fdff4

Browse files
authored
update readme (#141)
* update readme
1 parent df4a42e commit c4fdff4

1 file changed

Lines changed: 40 additions & 19 deletions

File tree

README.md

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,26 @@ Python SDKs provide an infrastructure-from-code style that lets you define resou
2828

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

31-
## Status
31+
- Reference Documentation: https://nitric.io/docs/reference/python
32+
- Guides: https://nitric.io/docs/guides/python
3233

33-
The SDK is in early stage development and APIs and interfaces are still subject to breaking changes. We’d love your feedback as we build additional functionality!
34-
35-
## Get in touch
36-
37-
- Ask questions in [GitHub discussions](https://github.com/nitrictech/nitric/discussions)
38-
39-
- Join us on [Discord](https://discord.gg/Webemece5C)
40-
41-
- Find us on [Twitter](https://twitter.com/nitric_io)
42-
43-
- Send us an [email](mailto:maintainers@nitric.io)
44-
45-
## Getting Started
34+
## Usage
4635

47-
### Using the [Nitric CLI](https://github.com/nitrictech/cli)
36+
### Starting a new project
4837

49-
> nitric is included in all python related projects by default
38+
Install the [Nitric CLI](https://nitric.io/docs/getting-started/installation), then generate your project:
5039

5140
```bash
5241
nitric new hello-world py-starter
5342
```
5443

5544
### Adding to an existing project
5645

46+
First of all, you need to install the library:
47+
5748
**pip**
5849

5950
```bash
60-
# Install the Nitric SDK
6151
pip3 install nitric
6252
```
6353

@@ -67,6 +57,37 @@ pip3 install nitric
6757
pipenv install nitric
6858
```
6959

70-
## Usage
60+
Then you're able to import the library and create cloud resources:
61+
62+
```python
63+
from nitric.resources import api, bucket
64+
from nitric.application import Nitric
65+
from nitric.context import HttpContext
66+
67+
publicApi = api("public")
68+
uploads = bucket("uploads").allow("write")
7169

72-
[Nitric Documentation](https://nitric.io/docs)
70+
@publicApi.get("/upload")
71+
async def upload(ctx: HttpContext):
72+
photo = uploads.file("images/photo.jpg")
73+
74+
url = await photo.upload_url()
75+
76+
ctx.res.body = {"url": url}
77+
78+
Nitric.run()
79+
```
80+
81+
## Learn more
82+
83+
Learn more by checking out the [Nitric documentation](https://nitric.io/docs).
84+
85+
## Get in touch:
86+
87+
- Join us on [Discord](https://nitric.io/chat)
88+
89+
- Ask questions in [GitHub discussions](https://github.com/nitrictech/nitric/discussions)
90+
91+
- Find us on [Twitter](https://twitter.com/nitric_io)
92+
93+
- Send us an [email](mailto:maintainers@nitric.io)

0 commit comments

Comments
 (0)