Skip to main content
https://cfl.dropboxstatic.com/static/images/sdk/stone_banner.png https://img.shields.io/pypi/pyversions/stone.svg https://img.shields.io/pypi/v/stone.svg https://codecov.io/gh/dropbox/stone/branch/main/graph/badge.svg

The Official Api Spec Language for Dropbox.

Documentation can be found on GitHub

Installation

Install stone using pip:

$ pip install --user stone

This will install a script stone to your PATH that can be run from the command line:

$ stone -h

Stone requires Python 3.11 or later.

Alternative

If you choose not to install stone using the method above, you will need to ensure that you have the Python packages packaging and Jinja2, which can be installed through pip:

$ pip install "packaging>=21.0" "Jinja2>=3.0.3"

If the stone package is in your PYTHONPATH, you can replace stone with python -m stone.cli as follows:

$ python -m stone.cli -h

If you have the stone package on your machine, but did not install it or add its location to your PYTHONPATH, you can use the following:

$ PYTHONPATH=path/to/stone python -m stone.cli -h

After installation, follow one of our Examples or read the Documentation.

Overview

Define an API once in Stone. Use backends, i.e. code generators, to translate your specification into objects and functions in the programming languages of your choice.

Warning: The documentation is undergoing a rewrite.

docs/overview.png

Stone is made up of several components:

Language

A language for writing API specifications, “specs” for short.

Command-Line Interface

The CLI (stone) generates code based on the provided specs, backend, and additional arguments.

Backends

There are builtin backends that come with Stone: Javascript, Python, Obj-C, Swift, and Typescript.

There are other backends we’ve written that aren’t part of the Stone package because they aren’t sufficiently general, and can’t realistically be re-used for non-Dropbox APIs: Go and Java.

Stone includes a Python interface for defining new backends based on its intermediate representation of specs. This gives you the freedom to generate to any target.

JSON Serialization

Stone defines a JSON-compatible serialization scheme.

Motivation

Stone was birthed at Dropbox at a time when it was becoming clear that API development needed to be scaled beyond a single team. The company was undergoing a large expansion in the number of product groups, and it wasn’t scalable for the API team, which traditionally dealt with core file operations, to learn the intricacies of each product and build corresponding APIs.

Stone’s chief goal is to decentralize API development and ownership at Dropbox. To be successful, it needed to do several things:

Decouple APIs from SDKS: Dropbox has first-party clients for our mobile apps, desktop client, and website. Each of these is implemented in a different language. Moreover, we wanted to continue providing SDKs to third-parties, over half of whom use our SDKs. It’s untenable to ask product groups that build APIs to also implement these endpoints in a half-dozen different language-specific SDKs. Without decoupling, as was the case in our v1 API, the SDKs will inevitably fall behind. Our solution is to have our SDKs automatically generated.

Improve Visibility into our APIs: These days, APIs aren’t just in the domain of engineering. Product managers, product specialists, partnerships, sales, and services groups all need to have clear and accurate specifications of our APIs. After all, APIs define Dropbox’s data models and functionality. Before Stone, API design documents obseleted by changes during implementation were the source of truth.

Consistency and Predictability: Consistency ranging from documentation tense to API patterns are important for making an API predictable and therefore easier to use. We needed an easy way to make and enforce patterns.

JSON: To make consumption easier for third parties, we wanted our data types to map to JSON. For cases where serialization efficiency (space and time) are important, you can try using msgpack (alpha support available in the Python generator). It’s possible also to define your own serialization scheme, but at that point, you may consider using something like Protobuf.

Stone is in active use for the Dropbox v2 API.

Assumptions

Stone makes no assumptions about the protocol layer being used to make API requests and return responses; its first use case is the Dropbox v2 API which operates over HTTP. Stone does not come with nor enforce any particular RPC framework.

Stone makes some assumptions about the data types supported in target programming languages. It’s assumed that there is a capacity for representing dictionaries (unordered string keys -> value), lists, numeric types, and strings.

Stone assumes that a route (or API endpoint) can have its argument and result types defined without relation to each other. In other words, the type of response does not change based on the input to the endpoint. An exception to this rule is afforded for error responses.

Examples

We provide Examples to help get you started with a lot of the basic functionality of Stone.

Getting Help

If you find a bug, please see CONTRIBUTING.md for information on how to report it.

If you need help that is not specific to Stone, please reach out to Dropbox Support.

License

Stone is distributed under the MIT license, please see LICENSE for more information.

Metadata

Release files for stone 3.5.5

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

Source distribution (sdist)

Source distribution for stone 3.5.5
File Size Uploaded
stone-3.5.5.tar.gz 336.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stone 3.5.5
File Interpreter ABI Platform
stone-3.5.5-py3-none-any.whl Python 3 none any Details

Total release size: 540.0 kB

Release files / stone-3.5.5.tar.gz

Download URL stone-3.5.5.tar.gz
Size 336.0 kB
Tags Source
SHA-256 checksum
How to use checksums
998e2d0909c859065547f5f54c7d11b66d019882bb4f773e78ec9f2023ca3694
BLAKE2b-256 checksum
How to use checksums
65d527f927b87016794feb8995814fde736b1a6fe43da99db448bc9aca6c5d46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / stone-3.5.5-py3-none-any.whl

Download URL stone-3.5.5-py3-none-any.whl
Size 204.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff04dcfe37efef6bfe744f59f4df1dd1a43716f47e28d7cf1165eb984a0b2c33
BLAKE2b-256 checksum
How to use checksums
c61ce14e0618fc10f0e5a18ad29ec10665f4ab7e2b378e34ed0b0b00343f0351
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.5.5 This release

2 release files

3.5.4

2 release files

3.5.3

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.9

2 release files

3.3.8

2 release files

3.3.7

2 release files

3.3.6

2 release files

3.3.3

2 release files

3.3.1

3 release files

3.3.0

3 release files

3.2.1

3 release files

3.2.0

3 release files

3.0.0

3 release files

2.2.2

3 release files

2.2.1

3 release files

2.2.0

3 release files

2.1.0

3 release files

2.0.0

3 release files

1.3.2

3 release files

1.3.1

3 release files

1.3.0

3 release files

1.0.0

3 release files

0.1

3 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