pyphrase 0.3.0
Client for the Phrase TMS API.
Requires Python: >=3.9
Keywords: phrase tms,memsource,api,translation,localization,tms

<div id="top"></div>


<!-- PROJECT SHIELDS -->


[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]



<!-- PROJECT LOGO -->


<h3 align="center">pyphrase</h3>

  <p align="center">
    Unofficial Python client for interacting with the Phrase TMS API (formerly Memsource).
    <br />


  </p>








<!-- ABOUT THE PROJECT -->

## About The Project

Work in progress, with some wrinkles to be ironed out and tests to be written. Remember to pin version if you use this for something important! 

Modern Python client for interacting with the Phrase TMS API, both for sync and async use. 

- Implements all documented paths and operations from #latest
- Typed (where possible) for validation and code completion support
- Fully documented methods with complete content of the Phrase TMS API docs
- sync and async clients

### New in 0.3

- Support for pydantic 2.x
- Updated models with current standing
- Fixed many issues, including header encoding for job creation
- Still work in progress and a lot to do
<p align="right">(<a href="#top">back to top</a>)</p>

### Built With
The code is based on the [Phrase TMS OpenAPI docs](https://cloud.memsource.com/web/docs/api) as of January 2024, which was parsed using [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator/) for the models
and a slightly modified version of [swagger-to](https://github.com/Parquery/swagger-to) for the methods. 



<p align="right">(<a href="#top">back to top</a>)</p>



<!-- GETTING STARTED -->

## Getting Started

### Installation


Install via pip

   ```sh
   pip install pyphrase
   ```

Or clone the repo

   ```sh
   git clone https://github.com/kuhnemann/pyphrase.git
   ```

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- USAGE EXAMPLES -->

## Usage

Initialize the client with the base URL of your Plunet instance, authenticate and start doing whatever you aim to do.


```sh
from pyphrase import SyncPhraseTMSClient, sync_get_phrase_tms_token


phrase_client = SyncPhraseTMSClient()

token_object = sync_get_phrase_tms_token(username=username, password=password)

project_data = phrase_client.project.getProject(token_object.token, projectUid="YOURPROJECT")
```


Complex objects are included by default, as generated by datamodel-code-generator.


<p align="right">(<a href="#top">back to top</a>)</p>




See the [open issues](https://github.com/kuhnemann/pyphrase/issues) for a full list of proposed features (and known
issues).

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- CONTRIBUTING -->

## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any
contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also
simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- LICENSE -->

## License

Distributed under the MIT License. See `LICENSE` for more information.

<p align="right">(<a href="#top">back to top</a>)</p>



<!-- CONTACT -->

## Contact

Henrik Kühnemann - [@hkuhnemann](https://twitter.com/hkuhnemann) - [hello@yellownape.se](mailto:hello@yellownape.se)

Project Link: [https://github.com/kuhnemann/pyphrase](https://github.com/kuhnemann/pyphrase)

<p align="right">(<a href="#top">back to top</a>)</p>



<p align="right">(<a href="#top">back to top</a>)</p>



<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->

[contributors-shield]: https://img.shields.io/github/contributors/kuhnemann/pyphrase.svg?style=for-the-badge

[contributors-url]: https://github.com/kuhnemann/pyphrase/graphs/contributors

[forks-shield]: https://img.shields.io/github/forks/kuhnemann/pyphrase.svg?style=for-the-badge

[forks-url]: https://github.com/kuhnemann/pyphrase/network/members

[stars-shield]: https://img.shields.io/github/stars/kuhnemann/pyphrase.svg?style=for-the-badge

[stars-url]: https://github.com/kuhnemann/pyphrase/stargazers

[issues-shield]: https://img.shields.io/github/issues/kuhnemann/pyphrase.svg?style=for-the-badge

[issues-url]: https://github.com/kuhnemann/pyphrase/issues

[license-shield]: https://img.shields.io/github/license/kuhnemann/pyphrase.svg?style=for-the-badge

[license-url]: https://github.com/kuhnemann/pyphrase/blob/main/LICENCE

[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555

[linkedin-url]: https://linkedin.com/in/henrik-kuhnemann

[product-screenshot]: images/screenshot.png