Skip to main content
osfclient

osfclient

travisbadge

The osfclient is a python library and a command-line client for up- and downloading files to and from your Open Science Framework projects. The Open Science Framework (OSF) is an open source project which facilitates the open collaboration of researchers on the web, by sharing data and other research outputs.

As such the OSF hosts large data sets, associated with papers or scientific projects, that can be freely downloaded. The osfclient allows people to store and retrieve large datasets associated to their scientific projects and papers on the OSF via the command line interface. If you are completely new to the OSF you can read their introductory materials

This is a very new project, it has some rough edges.

Installing

To use osfclient install it via pip:

$ pip install osfclient

For details on participating in the development of osfclient check out the Contributing section.

Usage

This project provides two things: a python library and a command-line program for interacting with files stored in the OSF.

The python library forms the basis for the command-line program. If you want programmatic access to your files use the library, otherwise try out the command-line program.

Read the full documentation: https://osfclient.readthedocs.io/en/latest/

Below are some examples on how to use it:

# get help and see available commands, get help on a specific command
$ osf -h
$ osf <command> -h

# setup a local folder for an existing project
$ osf init

# list all files for the project
$ osf ls

# fetch all files for the project
$ osf clone

# fetch an individual file from a project
$ osf fetch remote/path.txt local/file.txt

# add a new file
$ osf upload local/file.txt remote/path.txt

# add a new directory
$ osf upload -r local/directory/ remote/directory

If the project is private you will need to provide authentication details. The password will be retrieved from the OSF_PASSWORD environment variable or you will be asked directly by the tool when you run it.

You can set default values by using a configuration file in the current directory. This is what osf init does for you. To set the username and project ID create .osfcli.config:

[osf]
username = yourOSFaccount@example.com
project = 9zpcy

after which you can simply run osf ls to list the contents of the project.

Contributing

Contributions from everyone and anyone are welcome. Fork this repository, make your changes, add a test to cover them and create a Pull Request. Then one of the maintainers will review your changes. When all comments have been addressed and all tests pass your changes will be merged.

To setup a development version:

$ git clone https://github.com/YOURNAMEHERE/osfclient
$ git remote add upstream https://github.com/osfclient/osfclient
$ cd osfclient
$ pip install -r devRequirements.txt
$ pip install -e.

There are a few secret keys relevant to this project, like passwords to pypi.org, test.pypi.org, and the osfclient email account. We store these in an encrypted git repo on Keybase. If you need access to this repo, contact any of the following maintainters on Keybase:

  • Tim Head (@betatim)

  • Ben Lindsay (@benlindsay)

  • Fitz Elliott (@felliott)

  • Longze Chen (@cslzchen)

For more details and instructions: CONTRIBUTING.md

Metadata

Release files for osfclient 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for osfclient 0.0.4
File Size Uploaded
osfclient-0.0.4.tar.gz 26.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for osfclient 0.0.4
File Interpreter ABI Platform
osfclient-0.0.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 64.2 kB

Release files / osfclient-0.0.4.tar.gz

Download URL osfclient-0.0.4.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d4cd030b4146fdfebe4fbb22f9034881adaf9893eed9db72c78022e77acca2cf
BLAKE2b-256 checksum
How to use checksums
ac3356b132c19980e3b4952cb7290ebf83bfdc968aaec08d138c06d2c814767b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.11

Release files / osfclient-0.0.4-py2.py3-none-any.whl

Download URL osfclient-0.0.4-py2.py3-none-any.whl
Size 37.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
3972820e7ef0b86f4e5673026bbbfe7f93c468eee97f23b2d3ee1e254ba77f5d
BLAKE2b-256 checksum
How to use checksums
2d2fb24d24c6376f6087048e1aaf93b0a4a7a6a2f5709ef74b7a0bbe267f8d52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.11

Release history Release notifications | RSS feed

0.0.5

2 release files

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page