neon-api-proxy


Nameneon-api-proxy JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttps://github.com/NeonGeckoCom/neon_api_proxy
SummaryNeon Proxy for external API Calls
upload_time2024-06-18 00:16:37
maintainerNone
docs_urlNone
authorNeongecko
requires_pythonNone
licenseNeonAI License v1.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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/bc/7d/934d8df13bf3f824871a0871376cafd947473426e3ac2e633c9aace7e192/neon-api-proxy-0.6.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.6.0",
    "project_urls": {
        "Homepage": "https://github.com/NeonGeckoCom/neon_api_proxy"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "efa3a7fbbdac12708a8f3e5e3f3cd2dd29b41e163422cfd32229f5caa40d3d05",
                "md5": "9451a42460aedcb0f6ed87a7d010de45",
                "sha256": "9b2e8f7d6651642d2a2c2f8c43f8682898219630d210b424179d1a2f99f8ab1f"
            },
            "downloads": -1,
            "filename": "neon_api_proxy-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9451a42460aedcb0f6ed87a7d010de45",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 45515,
            "upload_time": "2024-06-18T00:16:33",
            "upload_time_iso_8601": "2024-06-18T00:16:33.440773Z",
            "url": "https://files.pythonhosted.org/packages/ef/a3/a7fbbdac12708a8f3e5e3f3cd2dd29b41e163422cfd32229f5caa40d3d05/neon_api_proxy-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc7d934d8df13bf3f824871a0871376cafd947473426e3ac2e633c9aace7e192",
                "md5": "056ee00ba093a8e82ab7ab897f263dcc",
                "sha256": "3a8f2f72bc83df17258746bfaa06bf0f4f73b1472709771134f979aaf5fea7b2"
            },
            "downloads": -1,
            "filename": "neon-api-proxy-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "056ee00ba093a8e82ab7ab897f263dcc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17069,
            "upload_time": "2024-06-18T00:16:37",
            "upload_time_iso_8601": "2024-06-18T00:16:37.795619Z",
            "url": "https://files.pythonhosted.org/packages/bc/7d/934d8df13bf3f824871a0871376cafd947473426e3ac2e633c9aace7e192/neon-api-proxy-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-18 00:16:37",
    "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"
}
        
Elapsed time: 0.44805s