Metadata-Version: 2.4
Name: rally-cli
Version: 2.0.4
Summary: Rally software API Client
Author: J. Andres Guerrero
Author-email: J. Andres Guerrero <juguerre@gmail.com>
License-Expression: MIT
Requires-Dist: requests>=2.28.1,<3
Requires-Dist: requests-futures>=1.0.0,<2
Requires-Dist: treelib>=1.6.1,<2
Requires-Dist: click>=8.1.3,<9
Requires-Dist: tqdm>=4.64.1,<5
Requires-Dist: simplejson>=3.18.0,<4
Requires-Dist: dateparser>=1.1.4,<2
Requires-Dist: pytz
Requires-Dist: pydantic>=2
Requires-Dist: coloredlogs>=15.0.1,<16
Requires-Dist: aiohttp>=3.8.3,<4
Requires-Dist: aiologger>=0.7.0,<1
Requires-Dist: python-dotenv>=1.1.0
Requires-Dist: toolz>=1.0.0
Requires-Python: >=3.9.0, <3.13
Description-Content-Type: text/markdown

# rally-cly:Rally API Client

## Install

From code repo dir:

```shell
pip install --user --editable .
```

## Use
> RallyTypeGeneric class is used for all models with no specific model Class
```python
from typing import List
from rallycli import RallyAPI
from rallycli.models import RallyTypeGeneric, type_names, US, Feature, User

rally_api = RallyAPI(key_based_auth=True,
                     external_key="<your_external_key_here>",
                     baseurl="https://eu1.rallydev.com/",
                     workspace="/workspace/<workspace_OID_here>")

project_ref: str = "/project/<your_project_OID_here>"

## getting the project
project: RallyTypeGeneric = rally_api.project_api.get_project_by_ref(project_ref)
## getting project releases
releases: List[RallyTypeGeneric] = rally_api.timebox_api.get_releases_for_project(project_ref=project.ref)
## getting project iterations
iterations: List[RallyTypeGeneric] = rally_api.timebox_api.get_active_iterations_for_project(project_ref=project.ref)
## create UserStory
us: US = US()
us.Name = f"Autocreated Us {n}"
us.Project = project_ref
us.Description = f"Test US {n} para rallycli python module. By {rally_api.user_api.get_this_user().EmailAddress}"
us.Owner = rally_api.user_api.get_this_user()
us.Release = releases[0].ref
us.Iteration = iterations[0].ref

created_us: US = rally_api.artifact_api.create_artifact(us, type_names.US)
print(created_us)

feature: Feature = rally_api.artifact_api.get_artifact_by_formattedid("FE1")
print(feature.Name)

# Get all disabled users using 4 parallel threads
users: List[User] = rally_api.query("( Disabled = true)", "user", fetch="Username",model_class=User,
                                    threads=4, pagesize=80)
```
