{ "info": { "author": "Jon Peirce", "author_email": "jon.peirce@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "`pyosf` is a pure Python library for simple file sync with Open Science Framework\n\nThis package is for simple synchronisation of files from the local file space to the Open Science Framework (OSF). There is a more complex fully-featured sync package by the Center for Open Science,\nwho created OSF, called [osf-sync](https://github.com/CenterForOpenScience/osf-sync)\n\nThe OSF official package is designed for continuous automated synchronisation of many projects (a la Dropbox). We needed something simpler (for combination with PsychoPy). `pyosf` package aims to perform basic search/login/sync operations with single projects on OSF but only when instructed to do so (no continuous sync).\n\nIn implementation `pyosf` differs from osf-sync in the following ways:\n\t* fewer dependencies\n\t* support for Python2.x\n\t* no GUI included (yet)\n\t* local database of files saved as flat json format (no database)\n\t* simpler handling of sync resolution rules(?)\n\nIt can be distributed freely under the MIT license.\n\n[![Build Status](https://travis-ci.org/psychopy/pyosf.svg?branch=master)](https://travis-ci.org/psychopy/pyosf)\n[![codecov.io](https://codecov.io/github/psychopy/pyosf/coverage.svg?branch=master)](https://codecov.io/github/psychopy/pyosf?branch=master)\n\nInstallation\n-------------------\n\n`pyosf` is compatible with Linux, OS X and Windows, and with Python 2.7 and Python 3.4 (upwards)\n\nInstall it with::\n\n\tpip install pyosf\n\nUsage\n---------\n\nWhen you first create a `Project`, or to perform searches for projects, you need to create a `Session`::\n\n import pyosf\n session = pyosf.Session(username=\"name@gmail.com\", password=\"xxyxyayxy\")\n\nThe `Session` allows you to conduct searches::\n\n```python\nusers = session.find_users(\"Peirce\") # a list of user ids\nprint users\njon_id = users[0]['id'] # we're just using the first one\nprojs = session.find_user_projects(user_id=jon_id) # id=None to find your own projects\nfor proj in projs:\n print(\"{}: {}\".format(proj.id, proj.title))\n\nosf_proj = session.open_project(proj_id) # or this if you know the project id\n```\n\nThen you can create a `Project` object to track the remote and local files. To do this you need:\n - project_file: a location to store project info\n - root_path:\n - osf: an OSF project object from a `Session`\n OR\n - simply a project file location, on subsequent repeats\n\n```python\nproj = pyosf.Project(project_file=\"/Home/myUserName/pyosfProjects/first.proj\",\n root_path=\"/Home/myUserName/experiments/firstExperiment\",\n osf=osf_proj)\nchanges = proj.analyze() #so you can inspect them if needed\nchanges.apply() #do the sync\nproj.save()\n```\n\nThe project file saves your username (but not password) and, if the username has previously been used to authenticate a `Session` with OSF then an authentication token will have been saved to `~/.pyosf/tokens.json` and that will allow the project to create a new session. i.e. on subseqent logins you can do just\n\n```python\nimport pyosf\n# no need to create a session second time around\nproj = pyosf.Project(project_file=\"/Home/myUserName/pyosfProjects/first.proj\")\nchanges = proj.analyze()\nchanges.apply()\n```\n\nSecurity and passwords\n---------------------------\n\nWhen you first create a `Session` you need to provide a username (email address) and your OSF password. These will be sent securely (over https) and an auth token will be retrieved. That auth token will be stored in readable text in the current user space of your computer (in ~/.pyosf/tokens.json). When a `Session` is subsequently created the username is used to check for a previous auth token and if one is found a password will not be needed.\n\nThe second step is from the `Project`. The `Project` stores in its .proj file (json format) the username that was being used for this sync (as supplied on first access). That username will be used to create a `Session` which will then fetch the appropriate token as described above.\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/psychopy/pyosf", "keywords": "Open Science Framework PsychoPy", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyosf", "package_url": "https://pypi.org/project/pyosf/", "platform": "", "project_url": "https://pypi.org/project/pyosf/", "project_urls": { "Homepage": "https://github.com/psychopy/pyosf" }, "release_url": "https://pypi.org/project/pyosf/1.0.5/", "requires_dist": null, "requires_python": "", "summary": "Python lib for synching with OpenScienceFramework projects", "version": "1.0.5" }, "last_serial": 2638484, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "a4258118e598e872169b2aeba1c800b4", "sha256": "cdc0c8ac1612e866a23da2a7ffc8d5f8416ddfaf4b8e8ba0f23646e6cc062c99" }, "downloads": -1, "filename": "pyosf-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a4258118e598e872169b2aeba1c800b4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 24142, "upload_time": "2016-03-29T10:21:06", "url": "https://files.pythonhosted.org/packages/79/f8/85956237c530980bd42baf22ec356f823cedd3994056f3829241a0c96041/pyosf-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58cfd6628d92e4f695e05d2dea14dcf5", "sha256": "859fe320a4f6c013bb1ee0bdb2f42e5a4caea4328830f0445a933978063e3982" }, "downloads": -1, "filename": "pyosf-1.0.1.tar.gz", "has_sig": false, "md5_digest": "58cfd6628d92e4f695e05d2dea14dcf5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20342, "upload_time": "2016-03-29T10:21:24", "url": "https://files.pythonhosted.org/packages/9b/b2/42ace52fc4950be29e0498de8a9ee1c519dbb997a362fe817949a3757800/pyosf-1.0.1.tar.gz" } ], "1.0.3": [], "1.0.4": [ { "comment_text": "", "digests": { "md5": "32f99f074c71c4c1568c3116c89817e5", "sha256": "ad917957c77298706fbe68cb3e46a992f025cc1c82106346a7ecce1321345bf6" }, "downloads": -1, "filename": "pyosf-1.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "32f99f074c71c4c1568c3116c89817e5", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 25093, "upload_time": "2016-05-05T11:26:35", "url": "https://files.pythonhosted.org/packages/ca/dc/c6f3efb2e178d738458c4f857492163b35c817ff5b61a445a66ea51035a4/pyosf-1.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c3e1b4f434293f0efef26db02f18348a", "sha256": "e47c384c27d8e4760908be03a3c8f80936aa76ee149a06f8ff156b9d2e6c0de0" }, "downloads": -1, "filename": "pyosf-1.0.4.tar.gz", "has_sig": false, "md5_digest": "c3e1b4f434293f0efef26db02f18348a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20957, "upload_time": "2016-05-05T11:26:27", "url": "https://files.pythonhosted.org/packages/ca/c3/4001b8192b2f07ea8a47e95a0817d45a7272602be5c60626a5a799f0688d/pyosf-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "4c1124271c5ed12ef37414a9fb0b4281", "sha256": "ea6ecf89bf9319baf9a5dbd8dd5b0a47982c6701609f813500f00db0b60147d3" }, "downloads": -1, "filename": "pyosf-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4c1124271c5ed12ef37414a9fb0b4281", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26315, "upload_time": "2017-02-13T13:41:38", "url": "https://files.pythonhosted.org/packages/d1/fa/091aea0dcd05cdc484b33d9556f648af966457882e38733b64a4c3728dd6/pyosf-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c6966ec2bdbb9171b23423bbef53b8e", "sha256": "d45cf885b10403259b37d4f919396db2c86dfd52a022facef63c25ee2e7d5b28" }, "downloads": -1, "filename": "pyosf-1.0.5.zip", "has_sig": false, "md5_digest": "7c6966ec2bdbb9171b23423bbef53b8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26645, "upload_time": "2017-02-13T13:43:31", "url": "https://files.pythonhosted.org/packages/fc/03/16fa680002b9baca7cfe4c6ca17f928094021a43d6f3dda9e7100c7cf0d9/pyosf-1.0.5.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4c1124271c5ed12ef37414a9fb0b4281", "sha256": "ea6ecf89bf9319baf9a5dbd8dd5b0a47982c6701609f813500f00db0b60147d3" }, "downloads": -1, "filename": "pyosf-1.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4c1124271c5ed12ef37414a9fb0b4281", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26315, "upload_time": "2017-02-13T13:41:38", "url": "https://files.pythonhosted.org/packages/d1/fa/091aea0dcd05cdc484b33d9556f648af966457882e38733b64a4c3728dd6/pyosf-1.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7c6966ec2bdbb9171b23423bbef53b8e", "sha256": "d45cf885b10403259b37d4f919396db2c86dfd52a022facef63c25ee2e7d5b28" }, "downloads": -1, "filename": "pyosf-1.0.5.zip", "has_sig": false, "md5_digest": "7c6966ec2bdbb9171b23423bbef53b8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26645, "upload_time": "2017-02-13T13:43:31", "url": "https://files.pythonhosted.org/packages/fc/03/16fa680002b9baca7cfe4c6ca17f928094021a43d6f3dda9e7100c7cf0d9/pyosf-1.0.5.zip" } ] }