Comments (1)
That's beyond the scope of the project, but it's trivial to do:
# jinja2/ext/humps.py
from jinja2.ext import Extension
import humps
class HumpsExtension(Extension):
def __init__(self, environment):
super(HumpsExtension, self).__init__(environment)
environment.filters['camelize'] = humps.camelize
environment.filters['decamelize'] = humps.decamelize
environment.filters['pascalize'] = humps.pascalize
environment.filters['kebabize'] = humps.kebabize
environment.filters['is_camelcase'] = humps.is_camelcase
environment.filters['is_pascalcase'] = humps.is_pascalcase
environment.filters['is_snakecase'] = humps.is_snakecase
environment.filters['is_kebabcase'] = humps.is_kebabcase
environment.filters['is_camelcase'] = humps.is_camelcase
environment.filters['is_snakecase'] = humps.is_snakecase
environment.filters['is_kebabcase'] = humps.is_kebabcase
# jinja2_env.py
jinja_env = Environment(extensions=['jinja2.ext.humps'])
from humps.
Related Issues (20)
- Drop support for 2.7 HOT 2
- Add coveralls to workflow
- Add `pylint` to linting tools
- ReadTheDocs build is failing after dropping Python 2.7
- Coveralls badge is not updating
- Support for Kebab case? HOT 6
- Add maximum depth option to all function to limit how deep to apply formatting
- Transition package manager from pipenv to poetry
- None and empty string input are not camelized correctly HOT 1
- decamelize incorrectly inserts _ after punctuation HOT 2
- Acronyms with inner digits do not decamelize correctly
- Add a conda-forge feedstock HOT 1
- An import issue after install and remove the 'humps' package. HOT 3
- [question] Abbreviation conversion assymetry workarounds HOT 3
- Ability to build debian deb pkg HOT 2
- Complete transition into using poetry and more HOT 1
- Streamlit
- camelizeKeys only rather than the full dictionary (values and keys) HOT 3
- Kebabize string with spaces
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from humps.