{"id":17194732,"url":"https://github.com/michaelhirn/feast-client","last_synced_at":"2025-04-13T20:17:03.044Z","repository":{"id":38007136,"uuid":"291740028","full_name":"MichaelHirn/feast-client","owner":"MichaelHirn","description":"Feast Client SDK for Node.js","archived":false,"fork":false,"pushed_at":"2023-01-06T14:05:33.000Z","size":644,"stargazers_count":6,"open_issues_count":17,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T07:35:53.143Z","etag":null,"topics":["feast","feature-store","javascript","nodejs","sdk","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MichaelHirn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-31T14:36:57.000Z","updated_at":"2023-08-10T05:35:32.000Z","dependencies_parsed_at":"2023-02-06T05:01:11.356Z","dependency_job_id":null,"html_url":"https://github.com/MichaelHirn/feast-client","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"MichaelHirn/ts-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelHirn%2Ffeast-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelHirn%2Ffeast-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelHirn%2Ffeast-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichaelHirn%2Ffeast-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MichaelHirn","download_url":"https://codeload.github.com/MichaelHirn/feast-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240117353,"owners_count":19750343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["feast","feature-store","javascript","nodejs","sdk","typescript"],"created_at":"2024-10-15T01:48:02.347Z","updated_at":"2025-02-24T02:30:43.584Z","avatar_url":"https://github.com/MichaelHirn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Feast Client SDK (Node.js)\n\nThis is a client for the Feature Store [Feast][feast_github], written in TypeScript.\n\nIt stays close to the [Python SDK][feast_python_sdk], but diverges from it in a few ways - see more on that below.\n\n## Install\n\n```bash\nnpm install feast-client --save\n```\n\n## Usage\n\n### TypeScript\n\n```typescript\nimport * as feast from 'feast-client'\n\n// instantiate a Feast Client\nconst feastClient = new feast.Client({ coreUrl: 'localhost:6565', servingUrl: 'localhost:6566' })\n\n// create a new Feast project\nawait feastClient.createProject('example-project')\n\n  // create a new Feast FeatureSet\nconst entity = feast.Entity.fromConfig('customerId', feast.ValueType.STRING)\nconst orderValue = feast.Feature.fromConfig('orderValueInUSDCents', feast.ValueType.INT32)\nconst ageOfCustomer = feast.Feature.fromConfig('ageOfCustomerInYears', feast.ValueType.INT32)\nconst featureSet = feast.FeatureSet.fromConfig('example-feature-set', {\n  project: 'example-project',\n  entities: [entity],\n  features: [orderValue, ageOfCustomer]\n})\n\n// register the FeatureSet with Feast\nawait feastClient.applyFeatureSet(featureSet)\n\n// create a feature row ...\nconst featureRow = feast.FeatureRow.fromConfig({\n  fields: {\n    orderValueInUSDCents: 995,\n    ageOfCustomerInYears: 30\n  },\n  eventTimestamp: Date.now(),\n  featureSet: 'example-project/example-feature-set'\n})\n\n// ... and submit to the server\nconst ingestionId = await feastClient.ingest([featureRow])\n```\n\n### JavaScript\n\n```javascript\nconst feast = require('feast-client')\n\n// instantiate a Feast Client\nconst feastClient = new feast.Client({ coreUrl: 'localhost:6565', servingUrl: 'localhost:6566' })\n\n// create a new Feast project\nawait feastClient.createProject('example-project')\n\n// create a new Feast FeatureSet\nconst entity = feast.Entity.fromConfig('customerId', ValueType.STRING)\nconst orderValue = feast.Feature.fromConfig('orderValueInUSDCents', ValueType.INT32)\nconst ageOfCustomer = feast.Feature.fromConfig('ageOfCustomerInYears', ValueType.INT32)\nconst featureSet = feast.FeatureSet.fromConfig('example-feature-set', {\n  project: 'example-project',\n  entities: [entity],\n  features: [orderValue, ageOfCustomer]\n})\n\n// register the FeatureSet with Feast\nawait feastClient.applyFeatureSet(featureSet)\n\n// create a feature row ...\nconst featureRow = feast.FeatureRow.fromConfig({\n  fields: {\n    orderValueInUSDCents: 995,\n    ageOfCustomerInYears: 30\n  },\n  eventTimestamp: Date.now(),\n  featureSet: 'example-project/example-feature-set'\n})\n\n// ... and submit to the server\nconst ingestionId = await feastClient.ingest([featureRow])\n```\n\nFor more see the [examples](./examples) directory.\n\n## Notes on differences between the Python SDK and Node.js SDK\n\n- `client.apply` - due to `apply` being an inherited function for all Objects in JS, `client.apply` is `client.applyFeatureSet` for this SDK. To apply (i.e. create or update) multiple feature sets at once use `applyFeatureSets`.\n- `new FeatureSet (also Entity and Feature)` - there are two common flows for instantiating a feature set - manually instantiating it (when it is not yet registered with Feast) and receiving a feature set that is registered with Feast. To support each flow conveniently, there are two constructor methods `FeatureSet.fromConfig` and `FeatureSet.fromFeast` - the constructor (i.e. `new FeatureSet`) is set to `private` and can not be called directly. The same applies to `Entity` and `Feature`.\n\n[feast_github]: https://github.com/feast-dev/feast\n[feast_python_sdk]: https://github.com/feast-dev/feast/tree/master/sdk/python\n\n## ToDo\n\n- Implement Authentication and Authorization features\n- Implement support for tags (aka. labels)\n- Implement `Statistics` features\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelhirn%2Ffeast-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelhirn%2Ffeast-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelhirn%2Ffeast-client/lists"}