63.X Notes - terrytaylorbonn/auxdrone GitHub Wiki

24.1030

This page is a dumpster of notes and possible junk.... moved a lot of stuff here 24.1030.







62.5 AWS Patterns

24.1019 (gdrive)

Patterns. Real world simple examples that show what the goal is.

Something like whats below.


Top AWS Services For Backend Developers

Be A Better Dev

image

7 ways to deploy containers on AWS

https://app.eraser.io/workspace/9XoQ8u9WzQsgEVuchk2g

image

Top 4 AWS Cloud Career Mistakes You NEED to Avoid Be A Better Dev

https://youtu.be/bYoSDUkNAaE?t=60

image




projects-to-learn-aws.pdf (be a better dev)

image

image

image

image

image




Practical Projects to Learn AWS Be A Better Dev

https://www.youtube.com/watch?v=06VgLTqNvU8

image

image

image

image

63.0a Demos 24.0925

All docs referenced on this page available on Gdrive.

The following are the (basic) demos I've gotten to work so far (its a start). I am in the "window shopping phase, experimenting with and documenting any promising API doc tools I can find. Later I will write getting started and conceptual guides based on the best tools.

Part 63.1 contains demos of API creation with NO API docs. Knowing how to create basic APIs is important for creating API docs.

FLASK NO SWAGGER
  • (OK) *63.3a_#21_(3.0)_flask_rest_api_tutorial_DaveGray_v02_24.0811_0903_0916.docx
  • (OK) 63.1_#24_Python_REST_API_Tutorial-Building_a_Flask_REST_API_Tech_With_Tim_v01_24.0915.docx // youtube.com/watch?v=GMppyAPbLYk 20.07, 70mins, sqlalchemy db, copilot guessed much of it
  • (OK) 63.1_#4_Create_A_Python_API_in_12_Minutes_Tech_With_Tim_v01_24.0915.docx
FASTAPI + SWAGGER
FLASK + SWAGGER
  • (OK) (24.01,50mins) (PAYWALL... but good overview) 63.1_#29_Build_APIs_with_Flask_the_right_way_02_24.0918.docx Build APIs with Flask (the right way) microapis https://www.youtube.com/watch?v=mt-0F_5KvQw (NOTE: PUT at the end of demo returned 500.. otherwise all OK)
SWASHBUCKLE (C#)
  • (OK) 63.2a.1_#41_swashbuckle_v07_24.0920.docx
SPHINX

Deploy = API doc available at URL.

  • (OK) 63.5__#51_nodejs_swagger_to_aws_v01_24.0924.docx, deployed swagger (in nodejs) to aws elastic beanstalk.
  • (OK) 63.5__#50_swagger_to_gitbook_v01_24.0923.docx, deployed swagger to gitbook.
  • (OK) 63.5__#49_swagger_to_railway_v01_24.0923.docx, deployed swagger to https://swaggerrailway-production.up.railway.app/api-docs/ .
  • (OK)("90%")(AZURE) 63.5__#53_nodejs_swagger_to_azure_v02_24.0925.docx (my test deployment on azure)
  • (OK)(AWS) 63.1__#46_fastapi_ec2_pixegami_v01_24.0922.docx How to Deploy FastAPI on AWS EC2: Quick and Easy Steps! pixegami https://www.youtube.com/watch?v=SgSnz7kW-Ko
SDK
  • (OK) 63.7_#43_sdk_caleb_v02_24.0921.docx. Create a simple SDK.
PYPI
  • (OK) 63.0a_#44_pypi_v01_24.0921.docx. Publish a PYTHON package to pypi.

63.0b Concepts 24.0924

This page is a WIP (work in progress). See also ___concepts.docx (outdated) on Gdrive.

This page decribes the main API doc concepts as I understand them (diagrams are my original)

  • 1 API doc types
  • 2 API doc workflows

1 API doc types

For now just quick "napkin" drawings (created 24.0924). Will redo later.

An app contains the code (Fast API, etc) for generating the API (which provides access to app functionality).

image

The Swagger file is generated from the

  • API code (inside the app (not shown in this diagram xxxxxxx))
  • Comments inside the code (API description, etc)

image

The Swagger docs can be created

  • manually (diagram below)
  • generated from an app like Sphinx (NOT SHOWN IN DIAGRAM XXXXXXXXX)

image

GraphQL basically does the following (my understanding; if I am correct, then I dont understand why I never seen such a straightforward description anywhere, especially from official GraphQL docs):

  • The query tool is used to create a query that specfies a tree of only the objects needed.
  • Query is sent to the Apollo server.
  • Apollo server executes the REST commands required to get all the required objects.
  • Apollo "distills" the content to send back to the query tool

image

[63.4 Test (Postman)]

Postman is used to test the API endpoints. Postman is like a browser that allows you to control things "under the hood". Postman can

  • Send URL requests like the browser
  • View and control request/response parameters (like browser F10 dev tools)
  • Main a history of commands (like browser history) and request/response details

image

Swagger docs can be published by sending to a host server that publishes

  • Without app server (for example: Gitbook)
  • With app server (such as NPM) (for example: Railway, AWS)

image

Swagger docs can also be published witin the app deployed on an app server.

image

2 API doc workflows

Pie in the sky workflows

  • Design APIs first with Swagger before coding (no one does this).

Ideal workflows

  • Create (basic) APIs.
  • Create API definitions / schemas from code.
  • Publish API docs (hosting sites, Railway, AWS, Gitbook, Heroku, etc).

Real-world API doc workflows

The following has been the typical workflow for my recent projects:

  1. Collect the existing API docs (what little existed).
  2. Learn the API hands on (using Postman/Swagger) with minimal assistance.
  3. Make my work available internally (usually via simple a tool like a Github wiki).
  4. Create hands-on quick start / getting started docs (with examples, examples, examples).
  5. Create a conceptual explanation of the big picture.
  6. Create a sanitized/obfuscated version of API (generate from code or (my preference) edit the swagger file directly).
  7. Publish the API (first internally, then externally) in something like Gitbook, a React app, etc.

The API docs I created provided details about the options, workflows, and prerequisites for endpoints. Documenting special cases that often are difficult to specify with just a swagger file.

All projects were successful. However

  • Published output was only made available to customers (not public) or the product failed.
  • My working docs were the confidential property of the client.
  • I did not record the details of what I did. That last day on the project always came much quicker than I expected.

63.4 Postman

24.0919 Gdrive

Test with postman.

image


63.3 GraphQL

24.0920 Gdrive

Note: Make sure that all useful content taken from this:

  • 63.2_(1.4)_api_sdk_graphql_v06_23.0901_24.0903_SANITIZED.docx

TODO

Other

  • ($2, no Gpay) GraphQL Crash Course https://netninja.dev/p/graphql-crash-course
  • 63.1b #13 [4] graphql examples (potpourri) 63.2_(1.4)_api_sdk_graphql_v06_23.0901_24.0903_SANITIZED.docx
  • 63.1b #19 httpswww.digitalocean.comcommunitytutorialsq=apollo 63.2_(1.4)_api_sdk_graphql_v06_23.0901_24.0903_SANITIZED.docx
  • 63.1b #20 hasura.iolearngraphqlintro-graphqlgraphql-mutations 63.2_(1.4)_api_sdk_graphql_v06_23.0901_24.0903_SANITIZED.docx
  • *(NetNinja, 90mins) GraphQL Course for Beginners freeCodeCamp.org https://www.youtube.com/watch?v=5199E50O7SI

(just use schema, or generate something?)

(was 4b graphql (stepzen/anvil))

63.6 API deploy

24.0919 Gdrive

Deploy API server (AWS, Gitbook, Heroku, etc etc).


24.0925 NOTES

django 24.0925

Comparisons of the Python platforms

cloud apps (heroku, etc)

https://github.com/anandrmedia/heroku-free-alternatives

  • adaptable.io | Just connect your GitHub repository and let Adaptable handle the rest.
  • alwaysdata.com | All your services in one place.
  • argonaut.dev | Deploy apps and infrastructure on your cloud in minutes. Support for custom and third-party app deployments on Kubernetes and Lambda environments.
  • cockroachlabs.cloud | Database - CockroachDB Serverless is a next-generation PostgreSQL, with consumption-based, truly elastic scaling and pricing. It has a free tier and no credit card is needed for signing up.
  • cloud66.com | Cloud 66 gives you everything you need to build, deploy and grow your applications on any cloud, without the headache of the "server stuff"
  • deta.sh | Build & deploy your ideas on the universe's most developer friendly cloud platform.
  • dokku.com | An open source PAAS alternative to Heroku.
  • domcloud.co | It's like those modern hosting platforms, but for the old school.
  • koyeb.com | For deploying full stack apps and APIs globally. Enjoy high-end performance thanks to fully automated deployments to BareMetal servers and our built-in edge network.
  • netlify.com | Free static site hosting with GitHub integration
  • northflank.com | Deploy any code, job, or database in seconds.
  • qoddi.com | Qoddi is a fully managed App Hosting Platform running on a tier 1 network at 10% of the cost of similar solutions.
  • render.com | One of the top Heroku alternatives with a free plan to get started.
  • withcoherence.com | Coherence automates DevOps for early stage teams laser focused on customer value.

not sure

REST Spring

Configure server (no API)

OTHERS

Web socket APIs ??

Apps of interest

My focus is on the the following

  • Python
    • fastapi
    • flask
    • django. add swagger:
      • github.com/tfranzel/drf-spectacular
      • drf-yasg.readthedocs.io/en/stable/
      • appliku.com/post/django-rest-framework-swagger-openapi-tutorial/
  • C#
    • Swashbuckle
    • NSwag
  • Java (Spring)
  • Swagger editor, Postman
  • Deployment
  • GraphQL

adaptable.io Just connect your GitHub repository and let Adaptable handle the rest. alwaysdata.com All your services in one place. argonaut.dev Deploy apps and infrastructure on your cloud in minutes. Support for custom and third-party app deployments on Kubernetes and Lambda environments. cockroachlabs.cloud Database - CockroachDB Serverless is a next-generation PostgreSQL, with consumption-based, truly elastic scaling and pricing. It has a free tier and no credit card is needed for signing up. cloud66.com Cloud 66 gives you everything you need to build, deploy and grow your applications on any cloud, without the headache of the "server stuff" deta.sh Build & deploy your ideas on the universe's most developer friendly cloud platform. dokku.com An open source PAAS alternative to Heroku. domcloud.co It's like those modern hosting platforms, but for the old school. koyeb.com For deploying full stack apps and APIs globally. Enjoy high-end performance thanks to fully automated deployments to BareMetal servers and our built-in edge network. netlify.com Free static site hosting with GitHub integration northflank.com Deploy any code, job, or database in seconds. qoddi.com Qoddi is a fully managed App Hosting Platform running on a tier 1 network at 10% of the cost of similar solutions. render.com One of the top Heroku alternatives with a free plan to get started. withcoherence.com Coherence automates DevOps for early stage teams laser focused on customer value.

24.0903

(gdrive) (no docs for this topics yet).

End user doc creation process

I created the core end user docs for almost all projects I have worked. The basic process that I have used (very successfully) is the following:

1 Initial tasks (~first month):

  • Create an internal github wiki with access for all.
  • Add any existing Quick Start, Getting Started docs (or similar docs).
  • Perform hands-on exploration of the target product.
  • Create (and publish internally) detailed and accurate (draft WIP) QS/GS docs.

2 Constantly build out the documentation:

  • Reorg wiki constantly, adding commentary, corrections.
  • After getting sufficient target product experience: Add more docs (User Guide, programming guide, API refs, etc).
  • Note: Continue to use Wiki/docx until confident of content and organization for entire doc set.

3 Demo final release doc tools:

  • Demo several options.
  • Add some of the existing docs.

4 Create a draft WIP doc site:

  • Select doc tools.
  • Publish.
  • Push for feedback from SME's.

5 Constant improvement.

63.7 SDKS =========================

24.0922 Gdrive

Django 24.0922

(google "add swagger to django rest framework")

SDKs

  • (OK) 63.7_#43_sdk_caleb_v02_24.0921.docx. Create a simple SDK.
  • 63.5 #15 Build a .NET SDK with OpenAPI and NSwag .NET Conf 2022 (no git) 63.2_(1.4)_api_sdk_graphql_v06_23.0901_24.0903_SANITIZED.docx
  • 63.5 #16 Writing a Python SDK (git) hedera smart contracts 63.2_(1.4)_api_sdk_graphql_v06_23.0901_24.0903_SANITIZED.docx
  • 63.5 #22 rlabbe fork 24.0831 (THIS IS FOR CREATING OWN SDK OFF OF THIS) 63.9_(20b_1)api_rlabbe_fork(+swag+flask)_v02_24.0903.docx

nswag

  • 63.7__63.2a.1#42_nswag_v07_24.0920.docx
  • _63.7__63.2a.2 #6 3 How to Generate C# Http Client in NSwag Swagger codegen Swashbuckle Logan Dunning 63.1_api_swagger-gen_web-publish_v04_24.0908.docx
  • 63.7__63.2a.2 #17 How To Use Nswag With ASP.NET Core And Generate Client Code With Nswag Studio 63.2(1.4)_api_sdk_graphql_v06_23.0901_24.0903_SANITIZED.docx

node

  • 63.7__63.0 #18 TS digitalocean setting-up-a-node-project-with-typescript WORKS! 63.2(1.4)_api_sdk_graphql_v06_23.0901_24.0903_SANITIZED.docx

LEFTOVERS

  • 63.7__63.2a.1,2 #12 [1] microsoft (.NET + APIs + SwashbuckleNSwag) 63.2(1.4)_api_sdk_graphql_v06_23.0901_24.0903_SANITIZED.docx
⚠️ **GitHub.com Fallback** ⚠️