معرفی شرکت ها


cognite-gql-pygen-0.4.1


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Cognite graphQL Python generation SDK
ویژگی مقدار
سیستم عامل -
نام فایل cognite-gql-pygen-0.4.1
نام cognite-gql-pygen
نسخه کتابخانه 0.4.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Cognite
ایمیل نویسنده support@cognite.com
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/cognite-gql-pygen/
مجوز -
Cognite GraphQL Python Generator ========================== [![build](https://github.com/cognitedata/cognite-gql-pygen/actions/workflows/release.yaml/badge.svg)](https://github.com/cognitedata/cognite-gql-pygen/actions/workflows/release.yaml) [![GitHub](https://img.shields.io/github/license/cognitedata/cognite-gql-pygen)](https://github.com/cognitedata/cognite-gql-pygen/blob/master/LICENSE) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) This is the Cognite GraphQL Python Generator, `gqlpygen`. The purpose of this package is to help developers to work with Cognite Data Fusion's (CDF) Data Models (DM) in Python. **[DISCLAIMER!]** This project is in a highly experimental no guarantees are made for consistency between versions. The project may also become deprecated if the experimentation turns out to be a dead end. The core functionality is to provide a Python client that match a data model. This enables the developer the following benefits * Client side validation of the data before writing it to CDF. * Autocompletion matching the data model in the integrated developer environment (IDE). This is important as it enables: * Discoverability of data model through Python. * Reduced typing errors in development. * Keeping the language domain specific for the developer. Instead of working with generic concepts such as instances, nodes, edges, the developer can work with the concepts in the data model. ## Installation To install this package: ```bash $ pip install cognite-gql-pygen ``` ## Usage The goal of the package is to have representations of all the types in a given data model with API calls to *.list()*, *.apply()*, *.delete()*, and *.retrieve()* individuals for each type. ![image](https://user-images.githubusercontent.com/60234212/234041823-f72a27e3-6450-4f05-99dc-50e87f762d0f.png) You can specify the data models either as a `.graphql` schema or a `pydantic` classes in a `.py` file. Then, you can use the CLI to automatically generate the other representation as well as the `client.py` file which creates the API and the convenience method get_[client_name]_client(). To generate from a `.graphql` schema you use the following command. ```bash dm topython 'PATH_TO_SCHEMA' ``` This will create a `schema.py` and a `client.py` file in the directory you are running the command. To generate from `schema.py` use the following command ```bash dm togql 'PATH_TO_FILE' ``` This will load the python module and create a `schema.graphql` file in the directory you are running the command. `PATH_TO_FILE` can be either a path to a `.py` file or a Python dot-notation to a package (e.g. `my_project.schema_module` make sure that the package in which case the module must be in Python path). Note the `schema.py` file must follow a specific structure, see [examples/cinematography_domain](https://github.com/cognitedata/cognite-gql-pygen/blob/main/examples/cinematography_domain/schema.py) for an example. The overall structure is as follows: 1. Instantiate a new schema with the line, `myschema: Schema[DomainModel] = Schema()` 2. Register all you Types with `@myschema.register_type` 3. Close the schema with `myschema.close()` To get a concrete example is available in [examples/cinematography_domain](https://github.com/cognitedata/cognite-gql-pygen/blob/main/examples/cinematography_domain), it consists of four files. * `schema.graphql` The schema defined in GraphQL language. * `schema.py` The schema defined in `pydantic` classes. * `client.py` Which sets up the client for the data model. * `usage.py` Demonstrates the usage of the client. ### Settings File `dm togql` and `dm topython` take their defaults form `settings.toml` if present. See [settings.toml](./cognite/dm_clients/settings.toml) for an example, section `[local]` is relevant for `togql` and `topython` commands. ### DM Non-GraphQl API The API developed is based on the non-GraphQL endpoints in Data Model API v3. There is a simplified wrapper which is available in `cognite.dm_clients`. See [dm_clients/README.md](cognite/dm_clients/README.md) for more details.__ ## Changelog Wondering about upcoming or previous changes to the SDK? Take a look at the [CHANGELOG](https://github.com/cognitedata/cognite-gql-pygen/blob/master/CHANGELOG.md). ## Contributing Want to contribute? Check out [CONTRIBUTING](https://github.com/cognitedata/cognite-gqlpygen/blob/master/CONTRIBUTING.md).


نیازمندی

مقدار نام
>=3.1 Jinja2
>=6.0,<7.0 PyYAML
>=1.2.2,<2.0.0 arrow
>=0.10.2,<0.11.0 cachelib
>=5.9.0,<6.0.0 cognite-sdk[pandas]
>=0.6.2,<0.7.0 docopt
>=3.1.12,<4.0.0 dynaconf
>=3.2 graphql-core
>=0.6.0,<0.7.0 loguru
>=1.16.0,<2.0.0 msal
>=1.23.2,<2.0.0 numpy
>=23.1,<24.0 packaging
>=1.10 pydantic
>=0.9.2,<0.10.0 retry
>=0.156.4,<0.157.0 strawberry-graphql
- typer[all]
>=4.5.0,<5.0.0 typing-extensions


زبان مورد نیاز

مقدار نام
>=3.9,<4.0 Python


نحوه نصب


نصب پکیج whl cognite-gql-pygen-0.4.1:

    pip install cognite-gql-pygen-0.4.1.whl


نصب پکیج tar.gz cognite-gql-pygen-0.4.1:

    pip install cognite-gql-pygen-0.4.1.tar.gz