From 97a5b509b71f21dd9afd39e1fd1b1b4688ada227 Mon Sep 17 00:00:00 2001 From: Tuan Dang Date: Wed, 4 Oct 2023 10:57:11 +0100 Subject: [PATCH] Point getting started SDK to SDK repos to avoid docs sprawl --- backend/src/ee/services/EELicenseService.ts | 2 +- docs/documentation/getting-started/sdks.mdx | 136 +------------------- 2 files changed, 6 insertions(+), 132 deletions(-) diff --git a/backend/src/ee/services/EELicenseService.ts b/backend/src/ee/services/EELicenseService.ts index 84d958eb7..733bf80e0 100644 --- a/backend/src/ee/services/EELicenseService.ts +++ b/backend/src/ee/services/EELicenseService.ts @@ -62,7 +62,7 @@ class EELicenseService { environmentLimit: null, environmentsUsed: 0, secretVersioning: true, - pitRecovery: true, + pitRecovery: false, ipAllowlisting: false, rbac: false, customRateLimits: false, diff --git a/docs/documentation/getting-started/sdks.mdx b/docs/documentation/getting-started/sdks.mdx index 67608bb81..a406c3ae6 100644 --- a/docs/documentation/getting-started/sdks.mdx +++ b/docs/documentation/getting-started/sdks.mdx @@ -9,137 +9,11 @@ Prerequisites: - Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com). - Create an [Infisical Token](/documentation/platform/token) scoped to an environment in your project in Infisical. -## Installation +## Usage -Follow the instructions for your language to install the SDK for it. +Follow the instructions for your language use the SDK for it: - - +- [Node SDK](https://github.com/Infisical/infisical-node) +- [Python SDK](https://github.com/Infisical/infisical-python) - Run `npm` to add [infisical-node](https://github.com/Infisical/infisical-node) to your project. - - ```console - $ npm install infisical-node --save - ``` - - ## Configuration - - Import the SDK and create a client instance with your [Infisical Token](/documentation/platform/token). - - - - ```js - import InfisicalClient from "infisical-node"; - - const client = new InfisicalClient({ - token: "your_infisical_token" - }); - ``` - - - - ```js - const InfisicalClient = require("infisical-node"); - - const client = new InfisicalClient({ - token: "your_infisical_token" - }); - ```` - - - ## Get a Secret - - ```js - const secret = await client.getSecret("API_KEY"); - const value = secret.secretValue; // get its value - ``` - - ## Basic Usage - - ```js - import express from "express"; - import InfisicalClient from "infisical-node"; - const app = express(); - const PORT = 3000; - - const client = new InfisicalClient({ - token: "YOUR_INFISICAL_TOKEN" - }); - - app.get("/", async (req, res) => { - // access value - const name = await client.getSecret("NAME"); - res.send(`Hello! My name is: ${name.secretValue}`); - }); - - app.listen(PORT, async () => { - console.log(`App listening on port ${port}`); - }); - ``` - - This example demonstrates how to use the Infisical Node SDK with an Express application. The application retrieves a secret named "NAME" and responds to requests with a greeting that includes the secret value. - - - - ## Installation - - Run `pip` to add [infisical-python](https://github.com/Astropilot/infisical-python) to your project - - ```console - $ pip install infisical - ``` - - Note: You need Python 3.7+. - - ## Configuration - - Import the SDK and create a client instance with your [Infisical Token](/documentation/platform/token). - - ```py - from infisical import InfisicalClient - - client = InfisicalClient(token="your_infisical_token") - ``` - - ## Get a Secret - - ```py - secret = client.get_secret("API_KEY") - value = secret.secret_value # get its value - ``` - - ## Basic Usage - - ```py - from flask import Flask - from infisical import InfisicalClient - - app = Flask(__name__) - - client = InfisicalClient(token="your_infisical_token") - - @app.route("/") - def hello_world(): - # access value - name = client.get_secret("NAME") - return f"Hello! My name is: {name.secret_value}" - ``` - - This example demonstrates how to use the Infisical Python SDK with a Flask application. The application retrieves a secret named "NAME" and responds to requests with a greeting that includes the secret value. - - - We're currently working on SDKs for other languages. Follow the GitHub issue for your needed language below: - - [Java](https://github.com/Infisical/infisical/issues/434) - - [Ruby](https://github.com/Infisical/infisical/issues/435) - - [Go](https://github.com/Infisical/infisical/issues/436) - - [Rust](https://github.com/Infisical/infisical/issues/437) - - [PHP](https://github.com/Infisical/infisical/issues/531) - - Missing a language? [Throw in a request](https://github.com/Infisical/infisical/issues). - - - -See also: - -- Explore the [Node SDK](https://github.com/Infisical/infisical-node) -- Explore the [Python SDK](https://github.com/Infisical/infisical-python) \ No newline at end of file +Missing a language? [Throw in a request](https://github.com/Infisical/infisical/issues). \ No newline at end of file