Skip to main content

Django app,to sync feishu contacts to ldap.

Project description

Poetry Template

Django app template, using poetry-python as dependency manager.

This project is a template that can be cloned and re-used for redistributable apps.

It includes the following:

  • poetry for dependency management
  • isort, black, pyupgrade and flake8 linting
  • pre-commit to run linting
  • mypy for type checking
  • tox and Github Actions for builds and CI

There are default config files for the linting and mypy.

Principles

The motivation for this project is to provide a consistent set of standards across all YunoJuno public Python/Django projects. The principles we want to encourage are:

  • Simple for developers to get up-and-running
  • Consistent style (black, isort, flake8)
  • Future-proof (pyupgrade)
  • Full type hinting (mypy)

Versioning

We currently support Python 3.7+, and Django 3.2+. We will aggressively upgrade Django versions, and we won't introduce hacks to support breaking changes - if Django 4 introduces something that 2.2 doesn't support we'll drop it.

Tests

Tests package

The package tests themselves are outside of the main library code, in a package that is itself a Django app (it contains models, settings, and any other artifacts required to run the tests (e.g. urls).) Where appropriate, this test app may be runnable as a Django project - so that developers can spin up the test app and see what admin screens look like, test migrations, etc.

Running tests

The tests themselves use pytest as the test runner. If you have installed the poetry evironment, you can run them thus:

$ poetry run pytest

or

$ poetry shell
(my_app) $ pytest

The full suite is controlled by tox, which contains a set of environments that will format, lint, and test against all support Python + Django version combinations.

$ tox
...
______________________ summary __________________________
  fmt: commands succeeded
  lint: commands succeeded
  mypy: commands succeeded
  py37-django22: commands succeeded
  py37-django32: commands succeeded
  py37-djangomain: commands succeeded
  py38-django22: commands succeeded
  py38-django32: commands succeeded
  py38-djangomain: commands succeeded
  py39-django22: commands succeeded
  py39-django32: commands succeeded
  py39-djangomain: commands succeeded

CI

There is a .github/workflows/tox.yml file that can be used as a baseline to run all of the tests on Github. This file runs the oldest (2.2), newest (3.2), and head of the main Django branch.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lark2ldap-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lark2ldap-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file lark2ldap-0.1.0.tar.gz.

File metadata

  • Download URL: lark2ldap-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.6 Darwin/22.1.0

File hashes

Hashes for lark2ldap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1b035eeac41263874fb84b52bbfb1210cafe965c7f0904d948894a5c6d58aa7f
MD5 e6e7e9cb23ba1602d8a7b8fa45970d60
BLAKE2b-256 a3c0b5541f74ceceb9b238953b1752a7e84dc68cb28386c0b3e9f8e95ec154e5

See more details on using hashes here.

File details

Details for the file lark2ldap-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lark2ldap-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.1 CPython/3.10.6 Darwin/22.1.0

File hashes

Hashes for lark2ldap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fb7037de7880137eddf84bff6cb05b27e9a73aedecfbb6e53d7ce5ef24155e4
MD5 0f6f207616e3a114f8eda636612552f3
BLAKE2b-256 3bbc91f771040ff40439595a3f026e3d1c375de177dc43d99d625d1985c2755c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page