Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yefim/upasteit-python
A Python wrapper for upasteit
https://github.com/yefim/upasteit-python
Last synced: about 9 hours ago
JSON representation
A Python wrapper for upasteit
- Host: GitHub
- URL: https://github.com/yefim/upasteit-python
- Owner: yefim
- Created: 2012-12-03T03:00:15.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-03T03:16:48.000Z (almost 12 years ago)
- Last Synced: 2024-04-15T03:17:10.846Z (7 months ago)
- Language: Python
- Size: 121 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Usage (paste and get)
### Setup
``` python
>>> from upasteit import UPaste
>>> geoffs_pastes = UPaste("geoff")
```
### Paste
``` python
>>> geoffs_pastes.paste("hello there")
{
"content": "hello there",
"created_at": "2012-12-02T22:10:04-05:00",
"user_id": 1,
"id": 1
}
```
### Paste more
``` python
>>> geoffs_pastes.paste(["first", "second", "potato"])
[
{
"content": "first",
"created_at": "2012-12-02T22:11:09-05:00",
"user_id": 1,
"id": 2
},
{
"content": "second",
"created_at": "2012-12-02T22:11:10-05:00",
"user_id": 1,
"id": 3
},
{
"content": "potato",
"created_at": "2012-12-02T22:11:10-05:00",
"user_id": 1,
"id": 4
}
]
```
### Get Pastes
``` python
>>> geoffs_pastes.get()
[
{
"content": "second",
"created_at": "2012-12-02T22:11:10-05:00",
"user_id": 1,
"id": 3
},
{
"content": "potato",
"created_at": "2012-12-02T22:11:10-05:00",
"user_id": 1,
"id": 4
},
{
"content": "first",
"created_at": "2012-12-02T22:11:09-05:00",
"user_id": 1,
"id": 2
},
{
"content": "hello there",
"created_at": "2012-12-02T22:10:04-05:00",
"user_id": 1,
"id": 1
}
]
```