port requests
from io import BytesIO</p>
<p>s3_file = requests.get(presigned_url)</p>
<p>url =  'https://gitlab.example.com/api/v4/projects/import'
files = {'file': ('file.tar.gz', BytesIO(s3_file.content))}
data = {
    "path": "example-project",
    "namespace": "example-group"
}
headers = {
    'Private-Token': "<your_access_token>"
}</p>
<p>requests.post(url, headers=headers, data=data, files=files)
```</p>
<p><code>json
{
  "id": 1,
  "description": null,
  "name": "Sample project",
  "name_with_namesp