endpoints.attachments.Attachments.create()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nop 3
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
from .base import Resource
2
3
4
# =======================================================
5
# Attachments
6
# =======================================================
7
class Attachments(Resource):
8
    def create(self,
9
               filename: str,
10
               file: bytes):
11
        files = {
12
            "files[]": (filename, file, "multipart/form-data")
13
        }
14
        return self._post("/attachments", files=files)
15