GithubHelp home page GithubHelp logo

toddbirchard / blog-webhook-api Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 3.84 MB

📑 🎛️ API to automate optimizations for self-hosted blogging platforms.

Python 98.84% Makefile 1.16%
python ghost api automation blogging bigquery google-cloud-storage github-api webhook-api

blog-webhook-api's Introduction

Personal HackersAndSlackers
Metrics Metrics

Calendar

Languages

Collaboration

Stargazers

RSS

blog-webhook-api's People

Contributors

dependabot[bot] avatar renovate-bot avatar renovate[bot] avatar toddbirchard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

wporganizer

blog-webhook-api's Issues

Comment creation fails spectacularly

  • All new comments fail due to mailgun
  • No meaningful messages are logged
  • Every request returns inaccurate 200 response code along with incorrect description

┆Issue is synchronized with this Jira Bug

New Endpoint

Changes which require a new API endpoint to be created.

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.


  • Check this box to trigger a request for Renovate to run again on this repository

┆Issue is synchronized with this Jira Task

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Analytics: Consume ‘Plausible’ API for site metrics

Fails as follows:

  • Plausible API returns list of top-visited URLs
  • Logic attempts to fetch corresponding post per URL from ghost admin api
    • “pages” and “posts” are considered different entities
    • Failure to filter page slugs results in error

┆Issue is synchronized with this Jira Bug

Bump Project Python version to 3.10

​Known Issues

I. Running locally fails to start

Running locally via {{unicorn }}results in the following error:

TypeError: cannot pickle _cffi_backend.FFI object

The make run command previously bypassed the usage of ASGI in development by instantiating the app via Python directly: python -m main.py.

Reverting changes to make run will likely resolve the issue, as main.py already handles uvicorn instantiation via uvicorn.run().

II. Poetry Update fails from apparent timeouts

Poetry fails to resolve package via “pythonhosted.” Attempting to install or update packages via poetry results in infinite failed requests.

Potential resources:

┆Issue is synchronized with this Jira Story

FastAPI: Utilize FastAPI's `SQLModel` & `Databases` Plugins

FastAPI Database Libraries

The implementation of FastAPI sister libraries SQLModel and Databases is highly optional. These libraries intend to improve developer experience; they are not required, nor do they offer significant performance benefits.

1. https://sqlmodel.tiangolo.com/

Extends SQLAlchemy’s “model” object with Pydantic syntax to avoid code duplication between Models and Schemas. Such duplication is otherwise nearly inevitable per FastAPI’s default pattern of defining SQLAlchemy https://fastapi.tiangolo.com/tutorial/sql-databases/?h=database#create-sqlalchemy-models-from-the-base-class alongside https://fastapi.tiangolo.com/tutorial/sql-databases/?h=database#create-sqlalchemy-models-from-the-base-class. Such duplication already exists in database/models.py and database/schemas.py, respectively.

2. https://fastapi.tiangolo.com/how-to/async-sql-encode-databases/?h=database#import-and-set-up-databases

FastAPI’s databases library allows predefined SQLAlchemy database models to build API responses defined solely via ORM queries. This is somewhat similar to the native Django behavior of defining model-based views (such as /list/[MODEL_NAME].

┆Issue is synchronized with this Jira Story

Analytics: Create data models for analytics fetched from Plausible & persist via ORM

  • Refactor & cleanup
    • Handle “weekly” and “monthly” analytics as separate endpoints
      • /analytics/weekly
      • /analytics/monthly
      • Point Ghost webhooks to both endpoints
    • Ensure “null” results are never included
  • Define new models & schemas
    • Create FastAPI Pydantic model representing each PageInsight
    • Create SQLAlchemy model representing each PageInsight
    • Modify SQL schema to handle additional insights (bounce rate, visitors, avg duration, etc.)
  • Persist
    • Store results via DB session after fetching (handle in same endpoint)

┆Issue is synchronized with this Jira Story

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.