openfoodfacts Dart 패키지는 전 세계 사용자들이 기여한 식품 제품 협업 데이터베이스인 Open Food Facts API에 쉽게 접근할 수 있도록 해줍니다. 개발자들은 성분, 영양 정보, 알레르기 유발 물질 및 바코드 데이터와 같은 상세한 제품 정보를 검색할 수 있습니다. 크로스플랫폼 애플리케이션을 위한 것으로 Android, iOS, Web, macOS, Windows, Linux를 지원합니다. 이 패키지는 Open Food Facts 데이터베이스와의 통합을 간소화하여 식품 투명성, 식사 추적 또는 영양 분석에 중점을 둔 앱에 이상적입니다.
사용 사례
바코드로 식품 제품 검색
영양 정보 검색
알레르기 원인 및 성분 스캔
식이 추적 애플리케이션
지속 가능한 식품 선택 연구
주요 기능
크로스 플랫폼 호환성
실시간 제품 데이터 액세스
바코드 및 키워드 검색 지원
오픈소스이며 커뮤니티 주도
간단한 API 통합
적합한 대상
건강 및 웰빙 앱
식품 라벨링 도구
식이 관리 플랫폼
교육용 식품 과학 앱
지속 가능성 중심 애플리케이션
고려 사항
외부 API 사용 가능 여부에 따라 다릅니다
데이터 품질은 사용자 기여에 따라 달라집니다
실시간 쿼리에는 인터넷 연결이 필요합니다
제한된 오프라인 기능
고사용량 시 속도 제한이 적용될 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Open Food Facts - Dart
Dart package for the Open Food Facts API. Free and Easy access to more than 2.9 million food products information from all around the world.
Open Food Facts is powered by contributors from around the world and is constantly growing thanks to them.
General principles, how does it work ?
We use the ability of the Open Food Facts API to return products results in JSON, we then generate easily understandable objects structures to make it simple for you to use.
This plugin also allows you to edit a product or upload a new one to Open Food Facts. Using the same simple product structure you can create a product object or edit an existing one and send it to the API using a single function.
Weekly meetings (currently inactive)
We e-meet on Fridays at 09:00 Paris Time (08:00 London Time, 11:30 IST, 12:00 AM PT)
Weekly Agenda: please add the Agenda items as early as you can. Make sure to check the Agenda items in advance of the meeting, so that we have the most informed discussions possible, leading to argumented decisions.
The meeting will handle Agenda items first, and if time permits, collaborative bug triage.
We strive to timebox the core of the meeting (decision making) to 30 minutes, with an optional free discussion/live debugging afterwards.
We take comprehensive notes in the Weekly Agenda of agenda item discussions and of decisions taken.
For most queries no authentication is required! :)
Though we recommend to set a User-Agent to not to be blocked by mistake.
Setup (Optional)
At the beginning of the app you can define some global settings so that they don't need to be specified in each query. You can override these static values at any time in the app lifecycle.
Some queries which modify or enter data need a user account to validate this request.
There are multiple ways to handle user accounts:
Let your users login / create Open Food Facts user accounts (Recommended)
Create a global user for your app through which all requests run
Currently there is no OAuth workflow, therefor a user is just a User object in this package.
So you need to get the username as well as the password from the users and store it somewhere save. For Flutter apps we recommend using the flutter_secure_storage package
For the user to be taken into account you have mount a global user at one point in your app lifecycle:
Regardless if you are using a global app or accounts per user. After mounting this, the user will be added to queries where the user can be attributed.
Some methods in OpenFoodAPIClient require to pass a User, there you can access the before mounted user with:
If your users do not expect a specific result immediately (eg. Inventory apps)
Send photos (front/nutrition/ingredients/packaging): most painless thing for your users
The Open Food Facts AI Robotoff will generate some derived data from the photos
Overtime, other apps, and the Open Food Facts community will fill the data gaps
If your users do expect a result immediately (eg Nutrition apps, Scoring apps…)
Send nutrition facts + category > get the Nutri-Score
Send ingredients > get the NOVA group (about food ultra-processing), additives, allergens, normalized ingredients, vegan, vegetarian…
Send category (strict minimum) + labels + origins of ingredients + packaging (photo and text) > get the Eco-Score (about environmental impact)
Open Data License
The database in under the OdBL. This means attributing the source and also contributing back any additions (photos, data), which this package makes easy to do.
You can check the terms of use here : Terms of use.
If you are having issues, that go beyond the scope of this package, please write to us on Slack or send us an email at reuse@openfoodfacts.org (or contact@openfoodfacts if not related to reuse)
Testing
Execute the following command from the root of the repository to run the tests:
dart test
Applications using this SDK
Official application
Open Food Facts (Codename Smoothie) is the official app developed by Open Food Facts, which is available on Android and iOS. The source code is also available on GitHub.