Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 71 committers (2.8%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.0%) to scientific vocabulary
Keywords
api
dropbox
dropbox-api
dropbox-v2
generator
python
stone
Last synced: 6 months ago
·
JSON representation
Repository
The Official API Spec Language for Dropbox API V2
Basic Info
- Host: GitHub
- Owner: dropbox
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://www.dropbox.com/developers
- Size: 2.46 MB
Statistics
- Stars: 405
- Watchers: 31
- Forks: 79
- Open Issues: 14
- Releases: 20
Topics
api
dropbox
dropbox-api
dropbox-v2
generator
python
stone
Created almost 10 years ago
· Last pushed 11 months ago
Metadata Files
Readme
Contributing
License
Code of conduct
README.rst
.. image:: https://cfl.dropboxstatic.com/static/images/sdk/stone_banner.png
:target: https://github.com/dropbox/stone
.. image:: https://img.shields.io/pypi/pyversions/stone.svg
:target: https://pypi.python.org/pypi/stone
.. image:: https://img.shields.io/pypi/v/stone.svg
:target: https://pypi.python.org/pypi/stone
.. image:: https://codecov.io/gh/dropbox/stone/branch/main/graph/badge.svg
:target: https://codecov.io/gh/dropbox/stone
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.
Alternative
-----------
If you choose not to install ``stone`` using the method above, you will need
to ensure that you have the Python packages ``ply`` and ``six``, which can be
installed through ``pip``::
$ pip install "ply>=3.4" "six>=1.3.0" "typing>=3.5.2"
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.
* Introduction
* Motivation_
* Installation_
* `Language Reference `_
* `Builtin Backends `_
* `Managing Specs `_
* `Evolving a Spec `_
* `Backend Reference `_
* `JSON Serializer `_
* `Network Protocol `_
*Warning: The documentation is undergoing a rewrite.*
.. image:: 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.
.. _logo: {logo_link}
.. _repo: https://github.com/dropbox/stone
.. _`Documentation`: https://github.com/dropbox/stone/tree/main/docs
.. _`Examples`: https://github.com/dropbox/stone/tree/main/example/backend
.. _LICENSE: https://github.com/dropbox/stone/blob/main/LICENSE
.. _CONTRIBUTING.md: https://github.com/dropbox/stone/blob/main/CONTRIBUTING.md
.. _`Dropbox Support`: https://www.dropbox.com/developers/contact
Owner
- Name: Dropbox
- Login: dropbox
- Kind: organization
- Location: San Francisco
- Website: https://dropbox.com/
- Repositories: 228
- Profile: https://github.com/dropbox
GitHub Events
Total
- Create event: 4
- Release event: 1
- Issues event: 1
- Watch event: 4
- Delete event: 4
- Issue comment event: 3
- Push event: 6
- Pull request event: 6
- Pull request review event: 5
Last Year
- Create event: 4
- Release event: 1
- Issues event: 1
- Watch event: 4
- Delete event: 4
- Issue comment event: 3
- Push event: 6
- Pull request event: 6
- Pull request review event: 5
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 724
- Total Committers: 71
- Avg Commits per committer: 10.197
- Development Distribution Score (DDS): 0.483
Top Committers
| Name | Commits | |
|---|---|---|
| Ken Elkabany | k****y@d****m | 374 |
| Stephen Cobbe | s****e@d****m | 70 |
| Ryan Pearl | r****l@d****m | 23 |
| Brad Rogers | b****s@g****m | 21 |
| Kannan Goundan | k****n@d****m | 17 |
| Peichao Zhang | s****0@g****m | 16 |
| Matt Bogosian | m****n@d****m | 15 |
| Connor Worley | c****y@g****m | 13 |
| Max Wittek | w****x@d****m | 9 |
| Connor Worley | c****y@d****m | 8 |
| Hector Matos | h****r@d****m | 7 |
| Elmer Le | e****r@d****m | 7 |
| dependabot[bot] | 4****]@u****m | 7 |
| Guido van Rossum | g****o@d****m | 6 |
| David Ramos | r****s@d****m | 6 |
| Phillip Huang | p****p@d****m | 6 |
| Ivan Levkivskyi | l****i@g****m | 6 |
| Peichao Zhang | p****o@d****m | 6 |
| yuxiang-he | y****e@u****m | 6 |
| Pranay Sowdaboina | p****y@d****m | 5 |
| Qiming Yuan | q****g@d****m | 5 |
| Scott Erickson | s****n@g****m | 5 |
| Milan Ghatak | m****k@d****m | 4 |
| Karandeep Johar | k****r@g****m | 4 |
| Benjamin Peterson | b****n@d****m | 4 |
| rob | r****g@d****m | 4 |
| lazytype | l****e@u****m | 3 |
| Jiuyang Zhao | j****o@d****m | 3 |
| Guido van Rossum | g****o@p****g | 3 |
| Ian Orton | i****n@i****m | 3 |
| and 41 more... | ||
Committer Domains (Top 20 + Academic)
dropbox.com: 34
andrew.cmu.edu: 1
akitasoftware.com: 1
icydog.net: 1
smarx.com: 1
bogosian.net: 1
live.cn: 1
cs.umass.edu: 1
elrepositorio.com: 1
alawson.io: 1
dirnberger.me: 1
ianorton-mbp.corp.dropbox.com: 1
python.org: 1
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 10
- Total pull requests: 145
- Average time to close issues: about 1 year
- Average time to close pull requests: 28 days
- Total issue authors: 8
- Total pull request authors: 22
- Average comments per issue: 5.1
- Average comments per pull request: 1.43
- Merged pull requests: 69
- Bot issues: 0
- Bot pull requests: 65
Past Year
- Issues: 2
- Pull requests: 16
- Average time to close issues: N/A
- Average time to close pull requests: 5 days
- Issue authors: 1
- Pull request authors: 4
- Average comments per issue: 2.5
- Average comments per pull request: 0.13
- Merged pull requests: 15
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- BastianZim (2)
- 0-wiz-0 (2)
- kloczek (1)
- devPalacio (1)
- moubctez (1)
- samschott (1)
- hugovk (1)
- fabaff (1)
Pull Request Authors
- dependabot[bot] (64)
- julianlocke (41)
- vidit2606 (15)
- rogebrd (11)
- rhui-dbx (11)
- sderickson (5)
- devPalacio (3)
- shizam (3)
- yanks (2)
- adecker89 (2)
- tominsam (2)
- Moraxyc (2)
- YufeiG (2)
- sunpoet (2)
- changusmc (2)
Top Labels
Issue Labels
bug (7)
question (2)
enhancement (1)
Pull Request Labels
dependencies (64)
github_actions (38)
python (26)
Packages
- Total packages: 4
-
Total downloads:
- pypi 1,125,098 last-month
- Total docker downloads: 7,238,114
-
Total dependent packages: 8
(may contain duplicates) -
Total dependent repositories: 288
(may contain duplicates) - Total versions: 53
- Total maintainers: 1
pypi.org: stone
Stone is an interface description language (IDL) for APIs.
- Homepage: https://github.com/dropbox/stone
- Documentation: https://stone.readthedocs.io/
- License: MIT License
-
Latest release: 3.3.9
published 11 months ago
Rankings
Downloads: 0.4%
Docker downloads count: 0.5%
Dependent repos count: 1.0%
Dependent packages count: 1.9%
Average: 2.0%
Stargazers count: 3.3%
Forks count: 4.9%
Maintainers (1)
Last synced:
6 months ago
proxy.golang.org: github.com/dropbox/stone
- Documentation: https://pkg.go.dev/github.com/dropbox/stone#section-documentation
- License: mit
-
Latest release: v3.3.9+incompatible
published 11 months ago
Rankings
Dependent packages count: 5.6%
Average: 5.8%
Dependent repos count: 6.0%
Last synced:
6 months ago
conda-forge.org: stone
- Homepage: https://www.dropbox.com/developers
- License: MIT
-
Latest release: 3.3.1
published about 4 years ago
Rankings
Dependent repos count: 8.3%
Average: 14.0%
Dependent packages count: 19.6%
Last synced:
7 months ago
anaconda.org: stone
Stone is an interface description language (IDL) for APIs.
- Homepage: https://www.dropbox.com/developers
- License: MIT
-
Latest release: 3.3.9
published 9 months ago
Rankings
Dependent packages count: 30.7%
Average: 32.5%
Dependent repos count: 33.0%
Forks count: 33.1%
Stargazers count: 33.3%
Last synced:
6 months ago
Dependencies
requirements.txt
pypi
- ply >=3.4
- six >=1.12.0
test/requirements.txt
pypi
- coverage ==5.5
- mock >=2.0.0,<5.0
- pytest <7
.github/workflows/CI.yaml
actions
- actions/checkout v2 composite
- actions/setup-python v2.2.1 composite
.github/workflows/coverage.yaml
actions
- actions/checkout v2 composite
- actions/setup-python v2.1.4 composite
- codecov/codecov-action v1.0.14 composite
.github/workflows/pypiupload.yaml
actions
- actions/checkout v2 composite
- actions/setup-python v2.1.4 composite