Mentions légales du service

Skip to content
Snippets Groups Projects
Verified Commit 8dfb098a authored by SIMONIN Matthieu's avatar SIMONIN Matthieu
Browse files

Remove pyyaml dependency

Fix #11
parent f4294da2
No related branches found
No related tags found
1 merge request!8Remove pyyaml dependency
......@@ -25,7 +25,6 @@ setup_requires =
wheel>=0.31.0
install_requires =
socketIO-client==0.5.7.4
pyyaml>=3.13.0
click~= 7.0
GitPython~=2.1.13
filetype~=1.0.5
......
......@@ -12,7 +12,6 @@ import zipfile
import filetype
from socketIO_client import SocketIO, BaseNamespace
import yaml
logger = logging.getLogger(__name__)
......@@ -166,38 +165,6 @@ class SyncClient:
self.login_data.pop("password")
self.sharelatex_sid = _r.cookies["sharelatex.sid"]
@classmethod
def from_yaml(cls, *, filepath=None):
"""Instantiate a new client from a configuration yaml file.
Note:
The yaml dictionnary is injected as kwargs of init method.
Examples:
.. code:: bash
# from your shell
echo '
username: MYLOGIN
password: MYPASSWORD
' > ~/.sharelatex.yaml
# from python
client = SyncClient.from_yaml()
Args:
filepath (str): Path to the configuration file
Returns:
A newly created instance of the client.
"""
if not filepath:
filepath = Path(os.environ.get("HOME"), ".sharelatex.yaml")
with open(filepath, "r") as f:
conf = yaml.load(f, Loader=yaml.BaseLoader)
return cls(**conf)
def get_project_data(self, project_id):
"""Get the project hierarchy and some metadata.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment