profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/muqshots/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

muqshots/discord-interactions 0

A simple API wrapper for Discord interactions.

muqshots/flask-ner 0

Flask + spaCy simple API for Named Entity Recognition

muqshots/ormar 0

python async orm with fastapi in mind and pydantic validation

muqshots/ticket_bot 0

TicketTool alternative

push eventmuqshots/wraparr

muqshots

commit sha e3396afa0c68a2ebaed8f8c345a1db93b30c5215

add docs

view details

push time in 5 minutes

push eventmuqshots/wraparr

muqshots

commit sha 8770dab9276d6afa50d3cb4c659d3617e1226416

add lookup_by_tmdb_id

view details

push time in 9 minutes

push eventmuqshots/wraparr

muqshots

commit sha 32547e49e7d6a4c7e9cb2a9c41da402bd6c3f9cb

add extra attributes to model

view details

push time in 15 minutes

push eventmuqshots/wraparr

muqshots

commit sha 0e8153c61548632e80734dca8c3bcad3091f8f5c

add movie add command

view details

push time in 16 minutes

push eventmuqshots/wraparr

muqshots

commit sha fd94d1a323498db140f5cdde1afe1ad28bbb8d33

add missing typehint

view details

muqshots

commit sha 8428a6922e27f4233fc93751a9c49ab89b681a45

add delete method

view details

push time in a day

push eventmuqshots/wraparr

muqshots

commit sha 6223ab3486da6dce1f4ac785fe0ada7fa3003173

add docstring delete_file

view details

push time in a day

push eventmuqshots/wraparr

muqshots

commit sha a16be244fb3e5380a13683aa8b4801e90a3646dd

add search method

view details

muqshots

commit sha 2947e8102725a8339b95a100e09bcaa0e9dcaaea

add delete_file method

view details

push time in a day

push eventmuqshots/wraparr

muqshots

commit sha 905baf008420bec885186f4f401824750b991ebd

use google style docstrings

view details

push time in 2 days

push eventmuqshots/wraparr

muqshots

commit sha e6346afd82ef9ed4d42ab9a0e7e5e94ad5075364

move __all__

view details

muqshots

commit sha 7fda0a91ef0ddf260de0e477756d0d0de7705748

use absolute imports

view details

muqshots

commit sha 68af94b5e336e36198a5eb3b77e890bde3d8acea

add radarr lookup command

view details

push time in 2 days

push eventmuqshots/wraparr

muqshots

commit sha 4375039b7d2b043c3e7b32c77d80352dc30e84d5

add AsyncArrBase

view details

push time in 2 days

push eventmuqshots/wraparr

muqshots

commit sha c8bf75e020b49011425b1c44f640dfecf8b80d2a

update requirements.txt

view details

muqshots

commit sha 692ee3db4630149fd470b124a027841fa2b7e310

add .gitignore

view details

push time in 2 days

create barnchmuqshots/wraparr

branch : master

created branch time in 2 days

created repositorymuqshots/wraparr

created time in 2 days

startedCarberra/Carberretta

started time in 3 days

startedtandemdude/hikari-lightbulb

started time in 8 days

startedFasterSpeeding/hikari

started time in 8 days

startedhikari-py/hikari

started time in 9 days

PublicEvent

push eventmuqshots/flask-ner

Alakh34

commit sha d97dd47e5f0475e852cd0f2a0f0770843647b12d

edit a bit

view details

push time in 2 months

fork muqshots/flask-ner

Flask + spaCy simple API for Named Entity Recognition

fork in 2 months

issue commentstribny/fastapi-video

It doesn't work when the video is cut from an origin mp4 by ffmpeg

Hey!, @Honghe did you ever find a solution?

Honghe

comment created time in 2 months

startedresume/resume.github.com

started time in 2 months

startedpython-gino/gino

started time in 2 months

startedtiangolo/fastapi

started time in 2 months

fork muqshots/ormar

python async orm with fastapi in mind and pydantic validation

https://collerek.github.io/ormar/

fork in 2 months

issue closedcollerek/ormar

update_or_create raising NoMatch()

Describe the bug method update_or_create raises NoMatch() instead of creating object

To Reproduce Steps to reproduce the behavior: Models defined as follows

class Movie(ormar.Model):
    class Meta(BaseMeta):
        tablename = 'movies'

    tmdb_id: int = ormar.Integer(nullable=False, primary_key=True)
    path: str = ormar.String(max_length=255)

route as follows

@router.post('/radarr')
async def add_movie(movie_to_add: AddMovieSchema):
    tmdb_id = movie_to_add.remoteMovie.tmdbId
    folder = movie_to_add.movie.folderPath.lstrip('/data/media/movies/merge/')
    filename = movie_to_add.movieFile.relativePath
    moviepath = os.path.join(folder, filename)
    movie = await Movie.objects.update_or_create(tmdb_id=tmdb_id, path=moviepath)
    return {}

(Note: this should be a complete and concise piece of code that allows reproduction of an issue)

Expected behavior If the pk tmdb_id exists, it will update the path column If the pk tmdb_id does not exist it will create the row

Screenshots If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Database backend used (mysql/sqlite/postgress) - sqlite
  • Python version - 3.9.1
  • ormar version - 0.10.14
  • pydantic version - 1.8.2
  • if applicable fastapi version - 0.66.0

Additional context error traceback

INFO:     127.0.0.1:63368 - "POST /radarr HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 371, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 59, in __call__      
    return await self.app(scope, receive, send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\fastapi\applications.py", line 199, in __call__
    await super().__call__(scope, receive, send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\middleware\errors.py", line 181, in __call__
    raise exc from None
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\middleware\errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\exceptions.py", line 82, in __call__
    raise exc from None
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 580, in __call__
    await route.handle(scope, receive, send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 241, in handle
    await self.app(scope, receive, send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 52, in app
    response = await func(request)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\fastapi\routing.py", line 216, in app
    raw_response = await run_endpoint_function(
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\fastapi\routing.py", line 149, in run_endpoint_function
    return await dependant.call(**values)
  File ".\app\routers\api\mediarr.py", line 20, in add_movie
    movie = await Movie.objects.update_or_create(tmdb_id=tmdb_id, path=path)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\ormar\queryset\queryset.py", line 987, in update_or_create
    model = await self.get(pk=kwargs[pk_name])
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\ormar\queryset\queryset.py", line 929, in get
    return await self.filter(*args, **kwargs).get()
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\ormar\queryset\queryset.py", line 949, in get
    self.check_single_result_rows_count(processed_rows)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\ormar\queryset\queryset.py", line 225, in check_single_result_rows_count
    raise NoMatch()
ormar.exceptions.NoMatch

closed time in 2 months

muqshots

issue commentcollerek/ormar

update_or_create raising NoMatch()

Alright thanks!, I'll close the issue now, Perhaps the documentation can be updated to clarify this a bit.

muqshots

comment created time in 2 months

issue commentcollerek/ormar

update_or_create raising NoMatch()

Ah thanks for the explanation, would this be the correct way to do it now?

movie = Movie.objects.filter(tmdb_id=tmdb_id).get_or_none()
if movie:
    await movie.update(path=path)
else:
    movie = await Movie(tmdb_id=tmdb_id, path=path).save()
muqshots

comment created time in 2 months

issue openedcollerek/ormar

update_or_create raising NoMatch()

Describe the bug method update_or_create raises NoMatch() instead of creating object

To Reproduce Steps to reproduce the behavior: Models defined as follows

class Movie(ormar.Model):
    class Meta(BaseMeta):
        tablename = 'movies'

    tmdb_id: int = ormar.Integer(nullable=False, primary_key=True)
    path: str = ormar.String(max_length=255)

route as follows

@router.post('/radarr')
async def add_movie(movie_to_add: AddMovieSchema):
    tmdb_id = movie_to_add.remoteMovie.tmdbId
    folder = movie_to_add.movie.folderPath.lstrip('/data/media/movies/merge/')
    filename = movie_to_add.movieFile.relativePath
    moviepath = os.path.join(folder, filename)
    movie = await Movie.objects.update_or_create(tmdb_id=tmdb_id, path=moviepath)
    return {}

(Note: this should be a complete and concise piece of code that allows reproduction of an issue)

Expected behavior If the pk tmdb_id exists, it will update the path column If the pk tmdb_id does not exist it will create the row

Screenshots If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Database backend used (mysql/sqlite/postgress) - sqlite
  • Python version - 3.9.1
  • ormar version - 0.10.14
  • pydantic version - 1.8.2
  • if applicable fastapi version - 0.66.0

Additional context error traceback

INFO:     127.0.0.1:63368 - "POST /radarr HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 371, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 59, in __call__      
    return await self.app(scope, receive, send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\fastapi\applications.py", line 199, in __call__
    await super().__call__(scope, receive, send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\middleware\errors.py", line 181, in __call__
    raise exc from None
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\middleware\errors.py", line 159, in __call__
    await self.app(scope, receive, _send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\exceptions.py", line 82, in __call__
    raise exc from None
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\exceptions.py", line 71, in __call__
    await self.app(scope, receive, sender)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 580, in __call__
    await route.handle(scope, receive, send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 241, in handle
    await self.app(scope, receive, send)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\starlette\routing.py", line 52, in app
    response = await func(request)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\fastapi\routing.py", line 216, in app
    raw_response = await run_endpoint_function(
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\fastapi\routing.py", line 149, in run_endpoint_function
    return await dependant.call(**values)
  File ".\app\routers\api\mediarr.py", line 20, in add_movie
    movie = await Movie.objects.update_or_create(tmdb_id=tmdb_id, path=path)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\ormar\queryset\queryset.py", line 987, in update_or_create
    model = await self.get(pk=kwargs[pk_name])
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\ormar\queryset\queryset.py", line 929, in get
    return await self.filter(*args, **kwargs).get()
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\ormar\queryset\queryset.py", line 949, in get
    self.check_single_result_rows_count(processed_rows)
  File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\ormar\queryset\queryset.py", line 225, in check_single_result_rows_count
    raise NoMatch()
ormar.exceptions.NoMatch

created time in 2 months