Skip to content
This repository was archived by the owner on Jul 7, 2021. It is now read-only.

Commit 99b3ac0

Browse files
author
Marcin S
committed
Update to v1.1.0
1 parent 4e7dd82 commit 99b3ac0

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ An SDK for integrating Skynet into Python applications.
44

55
## Instructions
66

7-
We recommend running your Python application using [virtualenv](https://docs.python-guide.org/dev/virtualenvs/). You can use `siaskynet` by installing it with `pip`, adding it to your `Pipfile`, or by cloning this repository.
7+
We recommend running your Python application using [pipenv](https://pipenv-searchable.readthedocs.io/basics.html). You can use `siaskynet` by installing it with `pip`, adding it to your project's `Pipfile`, or by cloning this repository.
88

99
## Documentation
1010

1111
For documentation complete with examples, please see [the Skynet SDK docs](https://nebulouslabs.github.io/skynet-docs/?python#introduction).
12+
13+
## Contributing
14+
15+
To run lints and tests on `python-skynet`, first run `make install` to install dependencies and then `make lint` or `make test`.

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="siaskynet",
8-
version="1.0.2",
8+
version="1.1.0",
99
author="Peter-Jan Brone",
1010
author_email="[email protected]",
1111
description="Skynet SDK",
@@ -15,6 +15,7 @@
1515
packages=setuptools.find_packages(),
1616
install_requires=[
1717
'requests',
18+
'responses',
1819
],
1920
classifiers=[
2021
"Programming Language :: Python :: 3",

siaskynet/pin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __default_unpin_options():
1818

1919
obj = utils.__default_options("")
2020
obj['endpoint_path_unpin_dir'] = "/renter/dir"
21-
obj['endpoint_path_unpin_file'] = "/renter/file"
21+
obj['endpoint_path_unpin_file'] = "/renter/delete"
2222

2323
return obj
2424

siaskynet/upload.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,21 @@ def __default_upload_options():
2121
def upload_file(path, custom_opts={}):
2222
"""Uploads file at path with the given options."""
2323

24-
skylink = upload_file_request(path, custom_opts).json()["skylink"]
25-
return utils.uri_skynet_prefix() + skylink
24+
r = upload_file_request(path, custom_opts)
25+
sia_url = utils.uri_skynet_prefix() + r.json()["skylink"]
26+
r.close()
27+
return sia_url
2628

2729

2830
def upload_file_request(path, custom_opts={}):
29-
"""Posts request to upload file."""
31+
"""
32+
Posts request to upload file.
33+
34+
:param str path: The local path of the file to upload.
35+
:param dict custom_opts: Custom options. See upload_file.
36+
:return: the full response
37+
:rtype: dict
38+
"""
3039

3140
opts = __default_upload_options()
3241
opts.update(custom_opts)

0 commit comments

Comments
 (0)