# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['y42', 'y42.cli', 'y42.clients', 'y42.models']

package_data = \
{'': ['*']}

install_requires = \
['httpx>=0.23.3,<0.24.0',
 'pydantic>=1.10.4,<2.0.0',
 'python-dotenv>=0.21.1,<0.22.0',
 'typer[all]>=0.7.0,<0.8.0']

entry_points = \
{'console_scripts': ['y42 = y42.cli.app:app']}

setup_kwargs = {
    'name': 'y42',
    'version': '0.0.3',
    'description': 'Client for programmatic usage of Y42',
    'long_description': '# y42-client-python\nA Python client library for the Y42 API. \nIt also contains a `y42` CLI utility for local development, built on this library.\n\nNote: The underlying API is currently still in an unstable 0.0.x release, \nmeaning things (like this library and CLI) may break unexpectedly from time to time.\n\n## Installation\nBoth the library and CLI tool can be installed via `pip3 install y42`.\n\n## Python library usage\nTODO - check the `tests` folder for some examples for now.\n\n## Create a new release\n\n- Bump `version` in `pyproject.toml` to desired semver release.\n- Commit change with `chore: bump version to x.y.z`.\n- Tag change with `git tag x.y.z`.\n- Push new commit together with tag.\n\n## CLI\n### Authorization\nThe CLI utility will look for a Y42_API_KEY environment variable. You can also specify, or override, the API key via the --api-key flag.\n\n### Help\nRun `y42 --help` to get help with commands:\n```console\nfoo@bar:~$ y42               \n                                                                                                                                                  \n Usage: y42 [OPTIONS] COMMAND [ARGS]...                                                                                                       \n                                                                                                                                                  \n╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --environment               TEXT  Override for Y42_ENVIRONMENT (\'prod\' or \'dev\') [default: None]                                               │\n│ --api-key                   TEXT  Override for Y42_API_KEY [default: None]                                                                     │\n│ --install-completion              Install completion for the current shell.                                                                    │\n│ --show-completion                 Show completion for the current shell, to copy it or customize the installation.                             │\n│ --help                            Show this message and exit.                                                                                  │\n╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ company    List/activate companies                                                                                                             │\n│ git        Helper alias for system\'s own `git` that applies Y42 authorization headers.                                                         │\n│ repos      Print all currently cloned spaces and their local git repository directories.                                                       │\n│ reset      Reset the local Y42 state. This does not delete your cloned repositories, (but will unlink them from the Y42 CLI).                  │\n│ space      Manage spaces in Y42                                                                                                                │\n│ state      Prints the current Y42 CLI app state in JSON format.                                                                                │\n│ status     Show currently active company and space, if any.                                                                                    │\n╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n\nfoo@bar:~$ y42 company --help\n                                                                                                                                                  \n Usage: y42 company [OPTIONS] COMMAND [ARGS]...                                                                                               \n                                                                                                                                                  \n List/activate companies                                                                                                                          \n                                                                                                                                                  \n╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --help          Show this message and exit.                                                                                                    │\n╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ activate      Activate company. Only needed if the specified Y42_API_KEY allows access to multiple companies.                                  │\n│ info          Print information about the specified (or only known) company in JSON format.                                                    │\n│ ls            Refresh and print the list of known Y42 companies for your current credentials.                                                  │\n╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n\nfoo@bar:~$ y42 space --help  \n                                                                                                                                                  \n Usage: y42 space [OPTIONS] COMMAND [ARGS]...                                                                                                 \n                                                                                                                                                  \n Manage spaces in Y42                                                                                                                             \n                                                                                                                                                  \n╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ --help          Show this message and exit.                                                                                                    │\n╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ clone    Helper for running `git clone` against the specified space\'s git repository.                                                          │\n│ info     Print information about the specified space. If no space is specified, the current working directory must be a space.                 │\n│ locate   Print the directory that the space has been cloned to, if any.                                                                        │\n│ ls       List known spaces                                                                                                                     │\n╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n\n\n```\n\nBasic CLI workflow:\n- Create an API key in Y42 and set Y42_API_KEY to this token, e.g. via `export Y42_API_KEY="your-api-key"`.\n- List your available spaces via `y42 space ls`\n- Clone a space via `y42 clone <space name or index> <target>`\n- cd into the space via `cd target`, or alternatively via `cd $(y42 space locate <space name or index>)`\n- Run git commands in the space, via `y42 git`, e.g. `y42 git add .` or `y42 git commit -am "Hello World!"`\n\n\n### Example CLI usage:\n```console\nfoo@bar:~$ y42 space ls\nNo known companies, refreshing..\nNo active company, defaulting to only known company my_company\n0: some-space\n1: another_space\n2: test_space\nfoo@bar:~$ y42 space clone test_space  # could also use "2" instead of "test_space" here\nSpace will be cloned to /Users/foo/spaces/test_space. Proceed? [Y/n]\n[Shell stderr output]\nCloning into \'/Users/foo/spaces/test_space\'...\nfoo@bar:~$ cd $(y42 space locate test_space)\nfoo@bar:~$ touch hello.txt\nfoo@bar:~$ y42 git add hello.txt # "y42" is optional for these kinds of local git commands\nfoo@bar:~$ y42 git commit -am "added hello.txt"\n[Shell stdout output]\n[main f285d88] added hello.txt\n 1 file changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 hello.txt\ntest_space > y42 git push\n[Shell stderr output]\nremote: [2b9cf0b112f709fbbef92066ce765369a698d45c..f285d8832701cb0712361d6e7b9b407722edde56] Response: Number of files:1, code:200, body:[true]        \nremote: [2b9cf0b112f709fbbef92066ce765369a698d45c..f285d8832701cb0712361d6e7b9b407722edde56] Response: Number of files:1, code:200, body:[]        \nTo https://api.dev.y42.dev/gateway/companies/524/spaces/9f095dd1-1c32-4a7d-bb74-a431a8dfdece/git\n   2b9cf0b..f285d88  main -> main\nfoo@bar:~$ y42 status\nConfigured Y42 root directory: /Users/foo/Library/Application Support/y42\nActive company: my_company\nSpace in current directory: test_space\nfoo@bar:~$ y42 repos \nmy_company/test_space -> /home/users/foo/spaces/test_space\n\n```\n',
    'author': 'Y42',
    'author_email': 'support@y42.com',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'None',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.10,<4.0',
}


setup(**setup_kwargs)
