Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

language-local

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

language-local

  • 0.0.9
  • PyPI
  • Socket score

Maintainers
1

python-package-template

To create local package and remote package layers (not to create GraphQL and REST-API layers)

directory structure

Root directory should have only .github/, ,gitignore, README.md and the project directory (i.e. location_local_python_package same as repo) - This will allow is to easily switch to mono repo
/location_local
/location_local/get_country_name
/location_local/get_country_name/src
/location_local/get_country_name/src/get_country_name.py
/location_local/get_country_name/tests
/location_local/get_country_name/tests/get_country_name_test.py

database Python scripts in /db folder

Please place .py in /db
No need for seperate file for _ml table
Please delete the example file if not needed

Create the files to create the database schema, tables, view and populate metadata and Test-Data

/db/.py - CREATE SCHEMA ... CREATE TABLE ... CREATE VIEW ... including _ml_table
/db/_insert.py to create metadata and Test-Data records

Update the setup.py (i.e.name, version)

Please create test directory inside the directory of the project i.e. //tests

Update the serverless.yml in the root directory

provider: stage: play1

Update the endpoints in serverless.yml

Working with VS Code

Please make sure you push to the repo launch.json fie that enables to run and debug the code

Unit-Test

We prefer using pytest and not unittest package

Please create pytest.init in the project-directory and not in the root directory

[pytest]
markers =
    test: custom mark for tests

When you took care of all the TODOs in the repo, using our infrastructure classes (i.e. Logger, Database, Url, Importer ...) your Feature Branch GitHub Actions Workflow is Green without warnings, all tests are running in GHA, code is documented, README.md is clean and self explained, test coverage is above 90% and all your lines are covered with Unit-Tests, you can filter and analyse your records in Logz.io, pull dev to your Feature Branch and only then create Pull Request to dev

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc