All Projects → dropbox → Stone

dropbox / Stone

Licence: mit
The Official API Spec Language for Dropbox API V2

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Stone

Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+2766.31%)
Mutual labels:  api, generator
Swagger Typescript Api
TypeScript API generator via Swagger scheme
Stars: ✭ 342 (-7.82%)
Mutual labels:  api, generator
Generator Swiftserver
WARNING: This repository is no longer maintained
Stars: ✭ 64 (-82.75%)
Mutual labels:  api, generator
Full Stack
Full stack, modern web application generator. Using Flask, PostgreSQL DB, Docker, Swagger, automatic HTTPS and more.
Stars: ✭ 451 (+21.56%)
Mutual labels:  api, generator
Luna Commons
市场上许多界面和工具的集合,例如ftp,httpd等文件与工具操作,包括但不限于图像处理、人脸识别等的api。
Stars: ✭ 244 (-34.23%)
Mutual labels:  api, generator
Drive
☁️ A distributed cloud based lazy drive to files integrated with Dropbox, Google Drive.
Stars: ✭ 36 (-90.3%)
Mutual labels:  api, dropbox
Api Client Generator
Angular REST API client generator from Swagger YAML or JSON file with camel case settigs
Stars: ✭ 92 (-75.2%)
Mutual labels:  api, generator
Forge Server Utils
Tools for accessing Autodesk Forge APIs from modern Node.js apps.
Stars: ✭ 23 (-93.8%)
Mutual labels:  api, generator
Apigcc
一个非侵入的api编译、收集、Rest文档生成工具。工具通过分析代码和注释,获取文档信息,生成RestDoc文档。
Stars: ✭ 198 (-46.63%)
Mutual labels:  api, generator
Dropbox Api
A minimal implementation of Dropbox API v2
Stars: ✭ 183 (-50.67%)
Mutual labels:  api, dropbox
Verb
HEADS UP! Verb is going though a major transition, we've completely refactored everything from the ground up. If you're interested, please see the dev branch.
Stars: ✭ 442 (+19.14%)
Mutual labels:  api, generator
Flysystem Dropbox
A flysystem driver for Dropbox that uses the v2 API
Stars: ✭ 254 (-31.54%)
Mutual labels:  api, dropbox
Routegen
Define your API and SPA routes in one place. Use them anywhere. Only 1.3kb.
Stars: ✭ 86 (-76.82%)
Mutual labels:  api, generator
Thispersondoesnotexist Js
Api for https://thispersondoesnotexist.com Generates an image of a person that does not exist in real life
Stars: ✭ 101 (-72.78%)
Mutual labels:  api, generator
Api Generator
PHP-code generator for Laravel framework, with complete support of JSON-API data format
Stars: ✭ 244 (-34.23%)
Mutual labels:  api, generator
Laravel Api To Postman
Generate a Postman collection automatically from your Laravel API
Stars: ✭ 320 (-13.75%)
Mutual labels:  api, generator
Lanzoucloud Api
蓝奏云网盘第三方 API
Stars: ✭ 355 (-4.31%)
Mutual labels:  api
Ocrserver
A simple OCR API server, seriously easy to be deployed by Docker, on Heroku as well
Stars: ✭ 359 (-3.23%)
Mutual labels:  api
Figma Graphql
The reimagined Figma API (super)powered by GraphQL
Stars: ✭ 354 (-4.58%)
Mutual labels:  api
Dokz
Effortless documentation with Next.js and MDX
Stars: ✭ 353 (-4.85%)
Mutual labels:  generator

.. 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

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 <https://github.com/dropbox/stone/blob/main/docs/lang_ref.rst>_
  • Builtin Backends <https://github.com/dropbox/stone/blob/main/docs/builtin_backends.rst>_
  • Managing Specs <https://github.com/dropbox/stone/blob/main/docs/managing_specs.rst>_
  • Evolving a Spec <https://github.com/dropbox/stone/blob/main/docs/evolve_spec.rst>_
  • Backend Reference <https://github.com/dropbox/stone/blob/main/docs/backend_ref.rst>_
  • JSON Serializer <https://github.com/dropbox/stone/blob/main/docs/json_serializer.rst>_
  • Network Protocol <https://github.com/dropbox/stone/blob/main/docs/network_protocol.rst>_

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 <https://github.com/google/protobuf>_.

Stone is in active use for the Dropbox v2 API <http://www.dropbox.com/developers>_.

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].