Skip to content

Commit 738dcd9

Browse files
committed
v5 prep
1 parent 07e1109 commit 738dcd9

File tree

17 files changed

+786
-719
lines changed

17 files changed

+786
-719
lines changed

.github/workflows/build.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,35 @@ jobs:
1919

2020
strategy:
2121
matrix:
22-
python-version: [ 3.9 ]
22+
python-version: [ "3.9", "3.10" ]
2323

2424
steps:
2525
- name: Checkout source
2626
uses: actions/checkout@v2
2727

28-
- name: Set up Python
28+
- name: "Set up Python ${{ matrix.python-version }}"
2929
uses: actions/setup-python@v1
3030
with:
3131
python-version: ${{ matrix.python-version }}
3232

33-
- name: Set up Poetry
34-
uses: Gr1N/setup-poetry@v4
33+
- name: "Set up Poetry ${{ matrix.python-version }}"
34+
uses: Gr1N/setup-poetry@v7
35+
with:
36+
poetry-preview: true
3537

36-
- name: Install Python deps
38+
- name: "Install Python deps ${{ matrix.python-version }}"
3739
run: |
38-
poetry install -E requests --no-dev
40+
poetry install --all-extras
3941
40-
- name: Check it imports
42+
- name: "Check it imports ${{ matrix.python-version }}"
4143
run: |
4244
poetry run python -c 'import mystbin'
4345
44-
- name: Build wheels
46+
- name: "Build wheels ${{ matrix.python-version }}"
4547
run: |
4648
poetry build
4749
48-
- name: Upload artifacts
50+
- name: "Upload artifacts ${{ matrix.python-version }}"
4951
uses: actions/upload-artifact@v2
5052
with:
5153
name: distributions
@@ -72,7 +74,9 @@ jobs:
7274
path: dist
7375

7476
- name: Set up Poetry
75-
uses: Gr1N/setup-poetry@v4
77+
uses: Gr1N/setup-poetry@v7
78+
with:
79+
poetry-preview: true
7680

7781
- name: Publish to PyPI
7882
env:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ __pycache__/
66
/*.egg-info/
77
docs/build
88
docs/_static/
9+
*.ipynb

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@
1313
<br>
1414

1515
A small simple wrapper around the [MystB.in](https://mystb.in/) API.
16+
API docs can be found [here](https://api.mystb.in/docs).
1617
----------
1718
### Features
1819

19-
- [x] - `POST`ing to the API, which will return the provided url.
20-
- [x] - `GET`ting from the API, provided you know the URL or paste ID.
21-
- [ ] - `DELETE`ing from the API, provided the paste is attached to your account.
22-
- [ ] - `PATCH`ing to the API, provided the paste is attached to your account.
23-
- [x] - Ability to pass in a sync or async session / parameter so it is flexible.
24-
- [x] - Write a real underlying Client for this, it will be required for...
25-
- [ ] - ... Authorization. Awaiting the API making this public as it is still WIP.
20+
- [x] - Creating pastes.
21+
- [x] - Editing pastes.
22+
- [x] - Deleting pastes.
23+
- [x] - Getting pastes.
24+
- [ ] - User endpoints.
25+
- [ ] - Sync client.
26+
- This one will take some time as I have no motivation to do it, but PRs are welcome if others want to do it.
2627

2728
### Installation
2829
This project will be on [PyPI](https://pypi.org/project/mystbin.py/) as a stable release, you can always find that there.

docs/client.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ API Reference
44
.. currentmodule:: mystbin
55

66
Client
7-
------
7+
-------
88
.. autoclass:: Client
99
:members:
1010

11-
.. autoclass:: SyncClient
12-
:members:
13-
1411
Paste
15-
-----
12+
------
1613
.. autoclass:: Paste
1714
:members:
1815

19-
.. autoclass:: PasteData
16+
File
17+
-----
18+
19+
.. autoclass:: File
2020
:members:

docs/exceptions.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@ Exceptions
33

44
.. currentmodule:: mystbin
55

6-
BadPasteID
7-
~~~~~~~~~~
8-
.. autoexception:: BadPasteID()
6+
APIException
7+
~~~~~~~~~~~~~
8+
.. autoexception:: APIException()
99

10-
MystbinException
11-
~~~~~~~~~~~~~~~~
12-
.. autoexception:: MystbinException()
13-
14-
APIError
15-
~~~~~~~~
16-
.. autoexception:: APIError()
10+
AuthenticationRequired
11+
~~~~~~~~~~~~~~~~~~~~~~~
12+
.. autoexception:: AuthenticationRequired()

mystbin/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
DEALINGS IN THE SOFTWARE.
2323
"""
2424

25+
__version__ = "5.0.0a"
26+
2527
from typing import Literal, NamedTuple
2628

2729
from .client import Client as Client
28-
from .client import SyncClient as SyncClient
29-
from .errors import *
30-
from .objects import Paste as Paste
31-
from .objects import PasteData as PasteData
30+
from .paste import File as File
31+
from .paste import Paste as Paste
3232

3333

3434
class VersionInfo(NamedTuple):
@@ -39,5 +39,4 @@ class VersionInfo(NamedTuple):
3939
serial: int
4040

4141

42-
__version__ = "4.0.2"
43-
version_info: VersionInfo = VersionInfo(major=4, minor=0, micro=2, releaselevel="final", serial=0)
42+
version_info: VersionInfo = VersionInfo(major=5, minor=0, micro=0, releaselevel="alpha", serial=0)

mystbin/__main__.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)