# NeonAI API Proxy
Proxies API calls to consolidate usage to a single point and allow for caching of API data.
## Request Format
API requests should be in the form of a dictionary. The service requested should be specified as `service` and the
remaining data will be passed to the `handle_query` method of the requested service as kwargs.
>Example Wolfram|Alpha Request:
>```json
>{
> "service": "wolfram_alpha",
> "query": "how far away is Rome?",
> "api": "simple",
> "units": "metric",
> "ip": "64.34.186.120"
>}
>```
## Response Format
Responses will be returned as dictionaries. Responses should contain the following:
- `status_code` - Usually contains the HTTP status code from the requested API, `-1` should be used to specify any other errors
- `content` - Usually contains the HTTP content (bytes) from the requested API, but may include a string message for errors.
- `encoding` = Usually contains the HTTP content encoding if content is the byte representation of a string, may be `None`
## Docker Configuration
When running this as a docker container, the `XDG_CONFIG_HOME` envvar is set to `/config`.
A configuration file at `/config/neon/diana.yaml` is required and should look like:
```yaml
MQ:
port: <MQ Port>
server: <MQ Hostname or IP>
users:
neon_api_connector:
password: <neon_api user's password>
user: neon_api
keys:
api_services:
alpha_vantage:
api_key: <Alpha Vantage Key>
open_weather_map:
api_key: <OWM Key>
wolfram_alpha:
api_key: <Wolfram|Alpha Key>
```
For example, if your configuration resides in `~/.config`:
```shell
export CONFIG_PATH="/home/${USER}/.config"
docker run -v ${CONFIG_PATH}:/config neon_api_proxy
```
> Note: If connecting to a local MQ server, you may need to specify `--network host`
Raw data
{
"_id": null,
"home_page": "https://github.com/NeonGeckoCom/neon_api_proxy",
"name": "neon-api-proxy",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Neongecko",
"author_email": "developers@neon.ai",
"download_url": "https://files.pythonhosted.org/packages/6c/b2/ba0d33f9cbb542ce8894eb270d450c67fe7f61c845b39bde14706f13ce87/neon-api-proxy-0.7.0.tar.gz",
"platform": null,
"description": "# NeonAI API Proxy\nProxies API calls to consolidate usage to a single point and allow for caching of API data.\n\n## Request Format\nAPI requests should be in the form of a dictionary. The service requested should be specified as `service` and the \nremaining data will be passed to the `handle_query` method of the requested service as kwargs.\n\n>Example Wolfram|Alpha Request:\n>```json\n>{\n> \"service\": \"wolfram_alpha\",\n> \"query\": \"how far away is Rome?\",\n> \"api\": \"simple\",\n> \"units\": \"metric\",\n> \"ip\": \"64.34.186.120\"\n>}\n>```\n\n## Response Format\nResponses will be returned as dictionaries. Responses should contain the following:\n- `status_code` - Usually contains the HTTP status code from the requested API, `-1` should be used to specify any other errors\n- `content` - Usually contains the HTTP content (bytes) from the requested API, but may include a string message for errors.\n- `encoding` = Usually contains the HTTP content encoding if content is the byte representation of a string, may be `None`\n\n## Docker Configuration\nWhen running this as a docker container, the `XDG_CONFIG_HOME` envvar is set to `/config`.\nA configuration file at `/config/neon/diana.yaml` is required and should look like:\n```yaml\nMQ:\n port: <MQ Port>\n server: <MQ Hostname or IP>\n users:\n neon_api_connector:\n password: <neon_api user's password>\n user: neon_api\nkeys:\n api_services:\n alpha_vantage:\n api_key: <Alpha Vantage Key>\n open_weather_map:\n api_key: <OWM Key>\n wolfram_alpha:\n api_key: <Wolfram|Alpha Key>\n```\n\nFor example, if your configuration resides in `~/.config`:\n```shell\nexport CONFIG_PATH=\"/home/${USER}/.config\"\ndocker run -v ${CONFIG_PATH}:/config neon_api_proxy\n```\n> Note: If connecting to a local MQ server, you may need to specify `--network host`\n",
"bugtrack_url": null,
"license": "NeonAI License v1.0",
"summary": "Neon Proxy for external API Calls",
"version": "0.7.0",
"project_urls": {
"Homepage": "https://github.com/NeonGeckoCom/neon_api_proxy"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b8e2dab96fda2109def8b001bea3e86e48deb56752c8d582f56f70cde53fc0ad",
"md5": "5f080eecd23905f96dd9f42da373ee2e",
"sha256": "4a2e7b06a366673643440ff95328dfeddcfd2d29dc32d3daeb6769ae26958ad2"
},
"downloads": -1,
"filename": "neon_api_proxy-0.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5f080eecd23905f96dd9f42da373ee2e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 45691,
"upload_time": "2024-09-24T00:43:00",
"upload_time_iso_8601": "2024-09-24T00:43:00.882667Z",
"url": "https://files.pythonhosted.org/packages/b8/e2/dab96fda2109def8b001bea3e86e48deb56752c8d582f56f70cde53fc0ad/neon_api_proxy-0.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6cb2ba0d33f9cbb542ce8894eb270d450c67fe7f61c845b39bde14706f13ce87",
"md5": "1debbba7d2f446e9c008e48236899bba",
"sha256": "7c9c11e23c601e85da63d808c143df7d0a29b9b3cd9365fd1ec6853432f848f5"
},
"downloads": -1,
"filename": "neon-api-proxy-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "1debbba7d2f446e9c008e48236899bba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17170,
"upload_time": "2024-09-24T00:43:02",
"upload_time_iso_8601": "2024-09-24T00:43:02.535763Z",
"url": "https://files.pythonhosted.org/packages/6c/b2/ba0d33f9cbb542ce8894eb270d450c67fe7f61c845b39bde14706f13ce87/neon-api-proxy-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-24 00:43:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NeonGeckoCom",
"github_project": "neon_api_proxy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "neon-api-proxy"
}