line / centraldogma-python Goto Github PK
View Code? Open in Web Editor NEWPython client library for Central Dogma
Home Page: https://line.github.io/centraldogma-python/
License: Apache License 2.0
Python client library for Central Dogma
Home Page: https://line.github.io/centraldogma-python/
License: Apache License 2.0
#14 introduced Query
type. The existing APIs that use a string as a query expression need to be updated such as.
centraldogma-python/centraldogma/query.py
Lines 30 to 45 in 6098f1a
I found some APIs whose return type should be Optional
type. So the return type needs to be wrapped with Optional
.
centraldogma-python/centraldogma/repository_service.py
Lines 34 to 40 in faae405
Optional[Repository]
, I thought that it would be better to raise a specific exception such as ProjectExistsException
None
. Because the meaning of None
is pretty implicit.exception
of error response for decoding to proper exceptions.requests
only supports HTTP/1 and is almost archived not to add new features. We need to consider other packages to support both HTTP/1 and HTTP/2. httpx
is one of powerful candidates.
I installed package and used example code from README.md.
but I got import error, as I read the code it's default value. so I think it should be documented well
ImportError: Using http2=True, but the 'h2' package is not installed. Make sure to install httpx using `pip install httpx[http2]`.
I think we need to update this on README.md and documentation
Currently, the project has requirements.txt
and requirements-dev.txt
separately.
However, PyCharm cannot cover this. It would be better to merge them.
Reference
Installing this client with pip install
is very useful.
Is there any obstacle to publish this client to PyPI?
Central Dogma provides a watch API with a long connection. It would be inefficient to use a thread for watching files.
I think we can use Event loop and Coroutines with asyncio for better performance and fewer resources.
Related #1 (comment)
We need to make proper exceptions when the response status is not the expected one.
Also, we might want to provide fine-grained exceptions as we do upstream.
For example, we could split NotFoundException
to RevisionNotFoundException
, ProjectNotFoundException
and RepositoryNotFoundException
.
Change
is a data class that only provides the default constructor.
It would be nice to offer various factories for users' convenience as like upstream Central Dogma did.
https://github.com/line/centraldogma/blob/ece893db888fbb5c4f1e28987b9aee10d78e5396/common/src/main/java/com/linecorp/centraldogma/common/Change.java#L65
to Github page maybe. If there is other option, we can discuss.
README.md could be a gentle guide for users to start centraldogma-python for the first time.
Examples:
https://github.com/line/centraldogma-go
https://github.com/line/centraldogma-rs
Currently, a revision is represented as an int.
centraldogma-python/centraldogma/dogma.py
Line 140 in 6098f1a
centraldogma-python/centraldogma/data/revision.py
Lines 20 to 34 in 6098f1a
I think we can use Code Review Doctor to check common mistakes automatically.
https://codereviewdoctor.medium.com/5-of-666-python-repos-had-comma-typos-including-tensorflow-and-pytorch-sentry-and-v8-7bc3ad9a1bb7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.