12
12
</div >
13
13
<br >
14
14
15
- A small simple wrapper around the [ Mystb.in] ( https://mystb.in/ ) API. API docs can be found [ here] ( https://api. mystb.in/docs ) .
15
+ A small simple wrapper around the [ Mystb.in] ( https://mystb.in/ ) API. API docs can be found [ here] ( https://mystb.in/api/documentation ) .
16
16
17
17
Documentation for this wrapper can be found [ here] ( https://mystbinpy.readthedocs.io/en/stable/ ) .
18
18
If you want the docs for the ` main ` branch, those can be found [ here] ( https://mystbinpy.readthedocs.io/en/latest/ ) .
@@ -21,12 +21,8 @@ If you want the docs for the `main` branch, those can be found [here](https://my
21
21
### Features
22
22
23
23
- [x] - Creating pastes.
24
- - [ ] Supporting attachments.
25
- - [ ] - Editing pastes.
26
- - Pending design work.
27
24
- [x] - Deleting pastes.
28
25
- [x] - Getting pastes.
29
- - [ ] - User endpoints.
30
26
- [ ] - Sync client.
31
27
- This one will take some time as I have no motivation to do it, but PRs are welcome if others want to do it.
32
28
@@ -51,8 +47,10 @@ import mystbin
51
47
52
48
client = mystbin.Client()
53
49
54
- paste = await client.create_paste(filename = " Hello.txt" , content = " Hello there!" )
55
- # we also support passing a mystbin.File directly to the `file=` kwarg!
50
+ file = mystbin.File(filename = " File1.txt" , content = " Hello there!" )
51
+ file2 = mystbin.File(filename = " test.py" , content = " print('hello!')" )
52
+
53
+ paste = await client.create_paste(files = [file , file2])
56
54
57
55
str (paste)
58
56
>> > ' https://mystb.in/<your generated ID>'
@@ -65,22 +63,6 @@ get_paste.created_at
65
63
>> > datetime.datetime(2020 , 10 , 6 , 10 , 53 , 57 , 556741 )
66
64
```
67
65
68
- Or if you want to create a paste with multiple files...
69
- ``` py
70
- import mystbin
71
-
72
- file = mystbin.File(filename = " File1.txt" , content = " Hello there!" )
73
- file2 = mystbin.File(filename = " test.py" , content = " print('hello!')" )
74
-
75
- paste = await client.create_paste(files = [file , file2])
76
-
77
- for file in paste.files:
78
- print (file .content)
79
-
80
- >> > " Hello there!"
81
- >> > " print('hello!')"
82
- ```
83
-
84
66
If you have any question please feel free to join the Pythonista Discord server:
85
67
<div align =" left " >
86
68
<a href="https://discord.gg/RAKc3HF">
0 commit comments